Client to consume Banco Inter APIs
Project description
Banco Inter
Client to consume Banco Inter APIs
- Documentation: https://bancointer.readthedocs.io.
Installation
pip install bancointer
How to Use
High-level API
from inter import Inter
inter = Inter(
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET"
cert_path='/path/to/certificado.crt',
key_path='/path/to/chave.key',
)
# get September/2022 statements
inter.get_statements(date(2022, 9, 1), date(2022, 9, 30))
Testing
from inter.testing import InterFake
def my_function(inter):
return inter.get_balance()
def test_my_function():
inter = InterFake()
result = my_function(inter)
assert result == inter.balance
Low-level API
from datetime import date
from inter import Client as Inter
inter = Inter(
"YOUR_CLIENT_ID",
"YOUR_CLIENT_SECRET"
'/path/to/certificado.crt',
'/path/to/chave.key',
)
# get September/2022 statements
inter.get_statements(date(2022, 9, 1), date(2022, 9, 30))
Testing
from inter.testing import ClientFake
def my_function(client):
return client.get_balance()
def test_my_function():
client = ClientFake()
result = my_function(client)
assert result == client.balance
Contributing
Contributions are welcome, feel free to open an Issue or Pull Request.
Pull requests must be for the develop
branch.
git clone https://github.com/lucasrcezimbra/bancointer
cd bancointer
git checkout develop
python -m venv .venv
source .venv/bin/activate
pip install .[test]
pre-commit install
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bancointer-0.0.6.tar.gz
(14.1 kB
view hashes)
Built Distribution
bancointer-0.0.6-py3-none-any.whl
(14.9 kB
view hashes)
Close
Hashes for bancointer-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff32e1c5570e9aed8db5a4ac70973a93abfd317f4a1a2c867bfc3d0d23925c35 |
|
MD5 | dc435af1d4853794b84d51256cbedf3a |
|
BLAKE2b-256 | 04f362d4331c636a35d6e964eec6f1e1e9071296f8f6ad4bf41d23bbd0d17714 |