mirror of
https://github.com/wassname/optlib.git
synced 2026-06-27 16:10:18 +08:00
Add querystring to requests.get and add requests to reqs
This commit is contained in:
+1
-4
@@ -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,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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user