Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fix to Accounts "list_transactions" and specifcy working urllib3 version #99

Merged
merged 3 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.idea/
.tox/
.coverage
.coverage.*
Expand Down
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ repos:
args: ["-f", "requirements.txt", "-o", "requirements.txt", "--without-hashes"]
- id: poetry-export # Dev dependencies
args: ["-f", "requirements.txt", "-o", "requirements_dev.txt", "--with", "dev", "--without-hashes"]
- id: poetry-install
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.12.0
hooks:
Expand Down Expand Up @@ -39,3 +38,5 @@ repos:
rev: 051fea31dbabf063ab38428c34a92c76d1abd5dc
hooks:
- id: pytest
args: ['--cov-config=.coveragerc', '--cov-branch', '--cov=pyetrade', '--cov-fail-under', '90',
'--cov-report', 'term-missing', '--cov-report', 'xml', 'tests/']
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ init:
pip install -r requirements.txt
devel:
pip install -r requirements_dev.txt
pre-commit install --hook-type pre-push --install-hooks -t post-checkout -t post-merge
pre-commit install --hook-type pre-commit --hook-type pre-push --install-hooks -t post-checkout -t post-merge
test:
tox
analysis: # Lint, format, import optimizer, etc.
Expand Down
1,550 changes: 791 additions & 759 deletions poetry.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions pyetrade/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ def get_portfolio_position_lot(
def list_transactions(
self,
account_id_key: str,
start_date: datetime = None,
end_date: datetime = None,
start_date: datetime.date = None,
end_date: datetime.date = None,
sort_order: str = "DESC",
marker: str = None,
count: int = 50,
Expand All @@ -252,10 +252,10 @@ def list_transactions(
:type account_id_key: str, required
:param start_date: The earliest date to include in the date range (history is available for two years),
defaults to None
:type start_date: datetime obj, optional
:type start_date: datetime.date obj, optional
:param end_date: The latest date to include in the date range (history is available for two years),
defaults to None
:type end_date: datetime obj, optional
:type end_date: datetime.date obj, optional
:param sort_order: The sort order request (ASC or DESC), default is DESC
:type sort_order: str, optional
:param marker: Specifies the desired starting point of the set of items to return (used for paging),
Expand All @@ -277,8 +277,8 @@ def list_transactions(
)

payload = {
"startDate": start_date.date().strftime("%m%d%Y") if start_date else None,
"endDate": end_date.date().strftime("%m%d%Y") if end_date else None,
"startDate": start_date.strftime("%m%d%Y") if start_date else None,
"endDate": end_date.strftime("%m%d%Y") if end_date else None,
"sortOrder": sort_order,
"marker": marker,
"count": count,
Expand Down
2 changes: 0 additions & 2 deletions pyetrade/alerts.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""Alerts - ETrade Alerts API
"""
import logging

import xmltodict
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyetrade"
version = "2.0.1"
version = "2.1.0"
description = "eTrade API wrapper"
authors = ["Jesse Cooper <[email protected]>"]
license = "GPL-3.0"
Expand All @@ -13,6 +13,7 @@ requests = "^2.31.0"
requests-oauthlib = "^2.0.0"
xmltodict = "^0.13.0"
jxmlease = "^1.0.3"
urllib3 = "1.26.19"

[tool.poetry.group.dev.dependencies]
black = "^24.4.0"
Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
certifi==2024.2.2 ; python_version >= "3.9" and python_version < "4.0"
charset-normalizer==3.3.2 ; python_version >= "3.9" and python_version < "4.0"
idna==3.7 ; python_version >= "3.9" and python_version < "4.0"
certifi==2024.8.30 ; python_version >= "3.9" and python_version < "4.0"
charset-normalizer==3.4.0 ; python_version >= "3.9" and python_version < "4.0"
idna==3.10 ; python_version >= "3.9" and python_version < "4.0"
jxmlease==1.0.3 ; python_version >= "3.9" and python_version < "4.0"
oauthlib==3.2.2 ; python_version >= "3.9" and python_version < "4.0"
python-dateutil==2.9.0.post0 ; python_version >= "3.9" and python_version < "4.0"
requests-oauthlib==2.0.0 ; python_version >= "3.9" and python_version < "4.0"
requests==2.31.0 ; python_version >= "3.9" and python_version < "4.0"
requests==2.32.3 ; python_version >= "3.9" and python_version < "4.0"
six==1.16.0 ; python_version >= "3.9" and python_version < "4.0"
urllib3==2.2.1 ; python_version >= "3.9" and python_version < "4.0"
urllib3==1.26.19 ; python_version >= "3.9" and python_version < "4.0"
xmltodict==0.13.0 ; python_version >= "3.9" and python_version < "4.0"
117 changes: 58 additions & 59 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,97 +1,96 @@
alabaster==0.7.16 ; python_version >= "3.9" and python_version < "4.0"
astroid==3.1.0 ; python_version >= "3.9" and python_version < "4.0"
babel==2.14.0 ; python_version >= "3.9" and python_version < "4.0"
black==24.4.0 ; python_version >= "3.9" and python_version < "4.0"
build==1.2.1 ; python_version >= "3.9" and python_version < "4.0"
astroid==3.3.5 ; python_version >= "3.9" and python_version < "4.0"
babel==2.16.0 ; python_version >= "3.9" and python_version < "4.0"
black==24.10.0 ; python_version >= "3.9" and python_version < "4.0"
build==1.2.2.post1 ; python_version >= "3.9" and python_version < "4.0"
bumpversion==0.5.3 ; python_version >= "3.9" and python_version < "4.0"
cachecontrol[filecache]==0.14.0 ; python_version >= "3.9" and python_version < "4.0"
cachetools==5.3.3 ; python_version >= "3.9" and python_version < "4.0"
certifi==2024.2.2 ; python_version >= "3.9" and python_version < "4.0"
cffi==1.16.0 ; python_version >= "3.9" and python_version < "4.0" and (sys_platform == "darwin" or sys_platform == "linux") and (sys_platform == "darwin" or platform_python_implementation != "PyPy")
cachetools==5.5.0 ; python_version >= "3.9" and python_version < "4.0"
certifi==2024.8.30 ; python_version >= "3.9" and python_version < "4.0"
cffi==1.17.1 ; python_version >= "3.9" and python_version < "4.0" and (sys_platform == "darwin" or sys_platform == "linux") and (sys_platform == "darwin" or platform_python_implementation != "PyPy")
cfgv==3.4.0 ; python_version >= "3.9" and python_version < "4.0"
chardet==5.2.0 ; python_version >= "3.9" and python_version < "4.0"
charset-normalizer==3.3.2 ; python_version >= "3.9" and python_version < "4.0"
charset-normalizer==3.4.0 ; python_version >= "3.9" and python_version < "4.0"
cleo==2.1.0 ; python_version >= "3.9" and python_version < "4.0"
click==8.1.7 ; python_version >= "3.9" and python_version < "4.0"
colorama==0.4.6 ; python_version >= "3.9" and python_version < "4.0"
coverage==7.4.4 ; python_version >= "3.9" and python_version < "4.0"
coverage[toml]==7.4.4 ; python_version >= "3.9" and python_version < "4.0"
coverage==7.6.4 ; python_version >= "3.9" and python_version < "4.0"
coverage[toml]==7.6.4 ; python_version >= "3.9" and python_version < "4.0"
crashtest==0.4.1 ; python_version >= "3.9" and python_version < "4.0"
cryptography==42.0.5 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "linux"
dill==0.3.8 ; python_version >= "3.9" and python_version < "4.0"
distlib==0.3.8 ; python_version >= "3.9" and python_version < "4.0"
docutils==0.21.1 ; python_version >= "3.9" and python_version < "4.0"
cryptography==43.0.3 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "linux"
dill==0.3.9 ; python_version >= "3.9" and python_version < "4.0"
distlib==0.3.9 ; python_version >= "3.9" and python_version < "4.0"
docutils==0.21.2 ; python_version >= "3.9" and python_version < "4.0"
dulwich==0.21.7 ; python_version >= "3.9" and python_version < "4.0"
exceptiongroup==1.2.1 ; python_version >= "3.9" and python_version < "3.11"
fastjsonschema==2.19.1 ; python_version >= "3.9" and python_version < "4.0"
filelock==3.13.4 ; python_version >= "3.9" and python_version < "4.0"
flake8==7.0.0 ; python_version >= "3.9" and python_version < "4.0"
identify==2.5.35 ; python_version >= "3.9" and python_version < "4.0"
idna==3.7 ; python_version >= "3.9" and python_version < "4.0"
exceptiongroup==1.2.2 ; python_version >= "3.9" and python_version < "3.11"
fastjsonschema==2.20.0 ; python_version >= "3.9" and python_version < "4.0"
filelock==3.16.1 ; python_version >= "3.9" and python_version < "4.0"
flake8==7.1.1 ; python_version >= "3.9" and python_version < "4.0"
identify==2.6.1 ; python_version >= "3.9" and python_version < "4.0"
idna==3.10 ; python_version >= "3.9" and python_version < "4.0"
imagesize==1.4.1 ; python_version >= "3.9" and python_version < "4.0"
importlib-metadata==7.1.0 ; python_version >= "3.9" and python_version < "3.12"
importlib-metadata==8.5.0 ; python_version >= "3.9" and python_version < "3.12"
iniconfig==2.0.0 ; python_version >= "3.9" and python_version < "4.0"
installer==0.7.0 ; python_version >= "3.9" and python_version < "4.0"
isort==5.13.2 ; python_version >= "3.9" and python_version < "4.0"
jaraco-classes==3.4.0 ; python_version >= "3.9" and python_version < "4.0"
jeepney==0.8.0 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "linux"
jinja2==3.1.3 ; python_version >= "3.9" and python_version < "4.0"
jinja2==3.1.4 ; python_version >= "3.9" and python_version < "4.0"
jxmlease==1.0.3 ; python_version >= "3.9" and python_version < "4.0"
keyring==24.3.1 ; python_version >= "3.9" and python_version < "4.0"
markupsafe==2.1.5 ; python_version >= "3.9" and python_version < "4.0"
markupsafe==3.0.2 ; python_version >= "3.9" and python_version < "4.0"
mccabe==0.7.0 ; python_version >= "3.9" and python_version < "4.0"
more-itertools==10.2.0 ; python_version >= "3.9" and python_version < "4.0"
msgpack==1.0.8 ; python_version >= "3.9" and python_version < "4.0"
more-itertools==10.5.0 ; python_version >= "3.9" and python_version < "4.0"
msgpack==1.1.0 ; python_version >= "3.9" and python_version < "4.0"
mypy-extensions==1.0.0 ; python_version >= "3.9" and python_version < "4.0"
nodeenv==1.8.0 ; python_version >= "3.9" and python_version < "4.0"
nodeenv==1.9.1 ; python_version >= "3.9" and python_version < "4.0"
oauthlib==3.2.2 ; python_version >= "3.9" and python_version < "4.0"
packaging==24.0 ; python_version >= "3.9" and python_version < "4.0"
packaging==24.1 ; python_version >= "3.9" and python_version < "4.0"
pathspec==0.12.1 ; python_version >= "3.9" and python_version < "4.0"
pexpect==4.9.0 ; python_version >= "3.9" and python_version < "4.0"
pkginfo==1.10.0 ; python_version >= "3.9" and python_version < "4.0"
platformdirs==4.2.0 ; python_version >= "3.9" and python_version < "4.0"
pluggy==1.4.0 ; python_version >= "3.9" and python_version < "4.0"
poetry-core==1.9.0 ; python_version >= "3.9" and python_version < "4.0"
poetry-plugin-export==1.7.1 ; python_version >= "3.9" and python_version < "4.0"
poetry==1.8.2 ; python_version >= "3.9" and python_version < "4.0"
pre-commit==3.7.0 ; python_version >= "3.9" and python_version < "4.0"
pkginfo==1.11.2 ; python_version >= "3.9" and python_version < "4.0"
platformdirs==4.3.6 ; python_version >= "3.9" and python_version < "4.0"
pluggy==1.5.0 ; python_version >= "3.9" and python_version < "4.0"
poetry-core==1.9.1 ; python_version >= "3.9" and python_version < "4.0"
poetry-plugin-export==1.8.0 ; python_version >= "3.9" and python_version < "4.0"
poetry==1.8.4 ; python_version >= "3.9" and python_version < "4.0"
pre-commit==3.8.0 ; python_version >= "3.9" and python_version < "4.0"
ptyprocess==0.7.0 ; python_version >= "3.9" and python_version < "4.0"
pycodestyle==2.11.1 ; python_version >= "3.9" and python_version < "4.0"
pycodestyle==2.12.1 ; python_version >= "3.9" and python_version < "4.0"
pycparser==2.22 ; python_version >= "3.9" and python_version < "4.0" and (sys_platform == "darwin" or sys_platform == "linux") and (sys_platform == "darwin" or platform_python_implementation != "PyPy")
pyflakes==3.2.0 ; python_version >= "3.9" and python_version < "4.0"
pygments==2.17.2 ; python_version >= "3.9" and python_version < "4.0"
pylint==3.1.0 ; python_version >= "3.9" and python_version < "4.0"
pyproject-api==1.6.1 ; python_version >= "3.9" and python_version < "4.0"
pyproject-hooks==1.0.0 ; python_version >= "3.9" and python_version < "4.0"
pygments==2.18.0 ; python_version >= "3.9" and python_version < "4.0"
pylint==3.3.1 ; python_version >= "3.9" and python_version < "4.0"
pyproject-api==1.8.0 ; python_version >= "3.9" and python_version < "4.0"
pyproject-hooks==1.2.0 ; python_version >= "3.9" and python_version < "4.0"
pytest-cov==5.0.0 ; python_version >= "3.9" and python_version < "4.0"
pytest-mock==3.14.0 ; python_version >= "3.9" and python_version < "4.0"
pytest==8.1.1 ; python_version >= "3.9" and python_version < "4.0"
pytest==8.3.3 ; python_version >= "3.9" and python_version < "4.0"
python-dateutil==2.9.0.post0 ; python_version >= "3.9" and python_version < "4.0"
pywin32-ctypes==0.2.2 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "win32"
pyyaml==6.0.1 ; python_version >= "3.9" and python_version < "4.0"
rapidfuzz==3.8.1 ; python_version >= "3.9" and python_version < "4.0"
pywin32-ctypes==0.2.3 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "win32"
pyyaml==6.0.2 ; python_version >= "3.9" and python_version < "4.0"
rapidfuzz==3.10.1 ; python_version >= "3.9" and python_version < "4.0"
requests-oauthlib==2.0.0 ; python_version >= "3.9" and python_version < "4.0"
requests-toolbelt==1.0.0 ; python_version >= "3.9" and python_version < "4.0"
requests==2.31.0 ; python_version >= "3.9" and python_version < "4.0"
requests==2.32.3 ; python_version >= "3.9" and python_version < "4.0"
secretstorage==3.3.3 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "linux"
setuptools==69.5.1 ; python_version >= "3.9" and python_version < "4.0"
shellingham==1.5.4 ; python_version >= "3.9" and python_version < "4.0"
six==1.16.0 ; python_version >= "3.9" and python_version < "4.0"
snowballstemmer==2.2.0 ; python_version >= "3.9" and python_version < "4.0"
sphinx==7.3.6 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-applehelp==1.0.8 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-devhelp==1.0.6 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-htmlhelp==2.0.5 ; python_version >= "3.9" and python_version < "4.0"
sphinx==7.4.7 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-applehelp==2.0.0 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-devhelp==2.0.0 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-htmlhelp==2.1.0 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-qthelp==1.0.7 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-serializinghtml==1.1.10 ; python_version >= "3.9" and python_version < "4.0"
tomli==2.0.1 ; python_version >= "3.9" and python_full_version <= "3.11.0a6"
tomlkit==0.12.4 ; python_version >= "3.9" and python_version < "4.0"
tox==4.14.2 ; python_version >= "3.9" and python_version < "4.0"
trove-classifiers==2024.4.10 ; python_version >= "3.9" and python_version < "4.0"
typing-extensions==4.11.0 ; python_version >= "3.9" and python_version < "3.11"
urllib3==2.2.1 ; python_version >= "3.9" and python_version < "4.0"
virtualenv==20.25.3 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-qthelp==2.0.0 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-serializinghtml==2.0.0 ; python_version >= "3.9" and python_version < "4.0"
tomli==2.0.2 ; python_version >= "3.9" and python_full_version <= "3.11.0a6"
tomlkit==0.13.2 ; python_version >= "3.9" and python_version < "4.0"
tox==4.23.2 ; python_version >= "3.9" and python_version < "4.0"
trove-classifiers==2024.10.21.16 ; python_version >= "3.9" and python_version < "4.0"
typing-extensions==4.12.2 ; python_version >= "3.9" and python_version < "3.11"
urllib3==1.26.19 ; python_version >= "3.9" and python_version < "4.0"
virtualenv==20.27.0 ; python_version >= "3.9" and python_version < "4.0"
xattr==1.1.0 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "darwin"
xmltodict==0.13.0 ; python_version >= "3.9" and python_version < "4.0"
zipp==3.18.1 ; python_version >= "3.9" and python_version < "3.12"
zipp==3.20.2 ; python_version >= "3.9" and python_version < "3.12"
Loading