Skip to main content

Client to consume Banco Inter APIs

Project description

Banco Inter

PyPI Coverage Status Documentation Status

Client to consume Banco Inter APIs

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


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.9.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

bancointer-0.0.9-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file bancointer-0.0.9.tar.gz.

File metadata

  • Download URL: bancointer-0.0.9.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for bancointer-0.0.9.tar.gz
Algorithm Hash digest
SHA256 174dc4a13baa378153cad2ed20ad73be47b602bfcfa16eac7132b405b3f11398
MD5 785a4e8b2c6dc8510f497e28cff4ee59
BLAKE2b-256 971df6b79fbd82b02ecc1ad6af427f3e456b3d3d6195f887833033f76758f11b

See more details on using hashes here.

File details

Details for the file bancointer-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: bancointer-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for bancointer-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 9ed06698d35597d6ee109ae98c36c4091162f096beb9ed2f7e6bc4268a825f8f
MD5 8fa8b482b9d19ab124916ce7010babf9
BLAKE2b-256 62ea2ad1d07611417c46e8b582592a2597d8375b36220617bbeea13fbbda4a02

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page