Add querystring to requests.get and add requests to reqs

This commit is contained in:
dbrojas
2022-06-27 13:02:47 +02:00
parent af49391a3c
commit d65b6922e0
2 changed files with 3 additions and 6 deletions
+1 -4
View File
@@ -39,10 +39,7 @@ def _get(endpoint, *args, **kwargs):
if "apikey" not in kwargs:
kwargs.update({"apikey": _get_env("TDA_API_KEY")})
url = "?".join([endpoint, "&".join(f"{k}={v}" for k, v in kwargs.items())])
logger.debug("GET", url)
r = requests.get(url)
r = requests.get(endpoint, params=kwargs)
r.raise_for_status()
return r.json()
+2 -2
View File
@@ -2,11 +2,11 @@ from setuptools import setup
setup(
name="optlib",
version="0.5.0",
version="0.5.1",
description="A library for financial options pricing written in Python.",
url="http://github.com/bartolomed/optlib",
author="Davis Edwards & Daniel Rojas",
packages=["optlib"],
install_requires=["numpy", "scipy", "pandas"],
install_requires=["numpy", "scipy", "pandas", "requests"],
zip_safe=False
)