takunomi-build-bot
5d9f4a9ebd
This commit was automatically generated by a script: https://gitfub.space/Jmaa/repo-manager
116 lines
4.1 KiB
Python
116 lines
4.1 KiB
Python
# WARNING
|
|
#
|
|
# THIS IS AN AUTOGENERATED FILE.
|
|
#
|
|
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN.
|
|
|
|
import re
|
|
|
|
from setuptools import setup
|
|
|
|
PACKAGE_NAME = 'fin_depo'
|
|
|
|
PACKAGE_DESCRIPTION = """
|
|
# Financial Depository Fetchers.
|
|
|
|
Python library for programmatic download of asset position information from
|
|
personal depository accounts.
|
|
|
|
This library is a core part of my personal financial applications, as it allows
|
|
me to monitor my investments on financial markets and web3 investments.
|
|
|
|
A lot can be said (mostly negative) about web3, but at least they are serious
|
|
about API access, which the modern banking system is not great at providing.
|
|
Even in The European Union, where GDPR is law and OpenBanking is a requirement,
|
|
it is hugely difficult for ordinary people to access and control their own
|
|
personal financial information.
|
|
|
|
This is a library; if you want a simple program for downloading the information
|
|
exposed by one of the supported services, try [my personal-data-fetchers
|
|
program](https://gitfub.space/Jmaa/personal-data-fetchers).
|
|
|
|
## Supported websites/services
|
|
|
|
- [**Kraken**](https://www.kraken.com/) crypto-currency exchange
|
|
(`KrakenDepoFetcher`):
|
|
Uses their [publicly documented API](https://docs.kraken.com/rest/). This
|
|
provides the same data as the homepage.
|
|
- [**Kucoin**](https://www.kucoin.com/) crypto-currency exchange
|
|
(`KucoinDepoFetcher`):
|
|
Uses their [publicly documented
|
|
API](https://www.kucoin.com/docs/beginners/introduction). This provides the
|
|
same data as is available on the Assets Overview Page. This fetcher also
|
|
allows for placing market orders, but be careful with this functionality.
|
|
- [**Partisia Blockchain**](https://browser.partisiablockchain.com/) wallet
|
|
balances (`PartisiaBlockchainAccountDepoFetcher`):
|
|
Uses a public reader node to check the account state. This is the same data as
|
|
can be found in the Partisia Browser Assets page.
|
|
- [**Nordnet**](https://www.nordnet.dk) nordic investment bank
|
|
(`NordnetDepoFetcher`):
|
|
Uses their [API](https://www.nordnet.dk/externalapi/docs/api). Thanks to
|
|
[Morten Helmstedt](https://helmstedt.dk/) for sharing his [Nordnet
|
|
utilities](https://github.com/helmstedt/nordnet-utilities), which helped with
|
|
implementing this functionality. Exposes the same data as the home page.
|
|
|
|
## Future extension
|
|
|
|
- [ ] Investment Bank: Saxo Bank OpenAPI
|
|
- [ ] Personal Bank: Personal Bank Account (Open Banking).
|
|
* Maybe using [Enable Banking](https://enablebanking.com/)? They seem to
|
|
allow developers to access their own accounts in a sort of half production
|
|
half demo environment.
|
|
* [AIIA](https://www.aiia.eu/) is also a possiblity?
|
|
- [ ] Partisia Blockchain: Implement sharding routing correctly.
|
|
- [ ] Depository history: Allow users to query both the state of their deposity
|
|
in the past, and to allow them to query the transactions.
|
|
* Most backends only support listing the transactions themselves, so the
|
|
depository history needs to be computed backwards from these.
|
|
""".strip()
|
|
|
|
PACKAGE_DESCRIPTION_SHORT = """
|
|
Python library for programmatic download of asset position information from
|
|
personal depository accounts.""".strip()
|
|
|
|
|
|
def parse_version_file(text: str) -> str:
|
|
match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
|
|
if match is None:
|
|
msg = 'Malformed _version.py file!'
|
|
raise Exception(msg)
|
|
return match.group(2)
|
|
|
|
|
|
with open(PACKAGE_NAME + '/_version.py') as f:
|
|
version = parse_version_file(f.read())
|
|
|
|
|
|
REQUIREMENTS_MAIN = [
|
|
'enforce-typing',
|
|
'python-kucoin',
|
|
'krakenex',
|
|
'frozendict',
|
|
'fin-defs @ git+https://gitfub.space/Jmaa/fin-defs.git',
|
|
]
|
|
REQUIREMENTS_TEST = [
|
|
'pytest',
|
|
'secret_loader @ git+https://gitfub.space/Jmaa/secret_loader.git',
|
|
]
|
|
|
|
|
|
setup(
|
|
name=PACKAGE_NAME,
|
|
version=version,
|
|
description=PACKAGE_DESCRIPTION_SHORT,
|
|
long_description=PACKAGE_DESCRIPTION,
|
|
long_description_content_type='text/markdown',
|
|
author='Jon Michael Aanes',
|
|
author_email='jonjmaa@gmail.com',
|
|
url='https://gitfub.space/Jmaa/' + PACKAGE_NAME,
|
|
packages=[PACKAGE_NAME],
|
|
install_requires=REQUIREMENTS_MAIN,
|
|
extras_require={
|
|
'test': REQUIREMENTS_TEST,
|
|
},
|
|
python_requires='>=3.9',
|
|
)
|