You have just found the Python-flavored client of Fintoc.
You can think of Fintoc API as a piscola.
And the key ingredient to a properly made piscola are the ice cubes.
Sure, you can still have a piscola without ice cubes.
But hey… that’s not enjoyable -- why would you do that?
Do yourself a favor: go grab some ice cubes by installing this refreshing library.
- How to install
- Quickstart
- Documentation
- Examples
- Dependencies
- How to test...
- Roadmap
- Acknowledgements
Install it with Poetry, the modern package manager.
$ poetry add fintoc
Don’t worry: if poetry is not your thing, you can also use pip.
$ pip install fintoc
Note: This client requires Python 3.6+.
- Get your API key and link your bank account using the Fintoc dashboard.
- Open your command-line interface.
- Write a few lines of Python to see your bank movements.
>>> from fintoc import Client
>>> client = Client("your_api_key")
>>> link = client.get_link("your_link_token")
>>> account = link.find(type_="checking_account")
>>> account.get_movements(since='2020-01-01')
And that’s it!
This client supports all Fintoc API endpoints. For complete information about the API, head to the docs.
from fintoc import Client
client = Client("your_api_key")
link = client.get_link("your_link_token")
for account in link:
print(account.name)
# Or... you can pretty print all the accounts in a Link
link.show_accounts()
If you want to find a specific account in a link, you can use find. You can search by any account field:
account = link.find(type_="checking_account")
account = link.find(number="1111111")
account = link.find(id_="sdfsdf234")
You can also search for multiple accounts matching a specific criteria with find_all:
clp_accounts = link.find_all(currency="CLP")
To update the account balance you can use update_balance:
account.update_balance()
print(account.balance.available)
from datetime import date, timedelta
from fintoc import Client
client = Client("your_api_key")
link = client.get_link("your_link_token")
account = link.find(type_="checking_account")
# You can get the account movements since a specific datetime
yesterday = date.today() - timedelta(days=1)
movements = account.get_movements(since=yesterday)
# Or... you can use an ISO 8601 formatted string representation of the datetime
movements = account.get_movements(since='2020-01-01')
Calling get_movements without arguments gets the last 30 movements of the account.
This project relies on these useful libraries.
- httpx -- a next-generation HTTP client
- tabulate -- pretty-print tabular data
- python-dateutil -- useful extensions to the standard Python datetime features
That’s a 🍰.
- Log in into your bank account and send me some money.
- Use this library to check if the movement is correct.
- You’re welcome.
You can run all the discoverable tests.
$ python -m unittest
- Add more docstrings
- Add more unit tests
- Add more type hints
This library was initially designed and handcrafted by @nebil,
ad piscolem.
He built it with the help of Gianni Roberto’s Picchi 2.