Skip to main content

Simple Tochka Bank Open API client

Project description

🎉 Tochka API

Simple Tochka Bank API wrapper

📥 Installation

📦 From pip:

python -m pip install -u tochka_api

🏗 From git:

git clone https://github.com/WhiteApfel/tochka_api.git
cd tochka_api
python setup.py install

🚧 Dev progress

  • Auth
  • Balances
  • Accounts
  • Webhooks
  • Statements
  • Cards
  • Clients
  • Payments
  • Consents
  • Special accounts
  • SBP
    • QR
    • Merchants
    • Legal
    • Refunds
    • Account

🧑‍🏫 How to use

import asyncio

from tochka_api import TochkaAPI
from tochka_api.models import PermissionsEnum

client_id = "<<client_id>>"
client_secret = "<<client_secret>>"
redirect_uri = "https://tochka-api.pfel.cc/"

tochka = TochkaAPI(client_id, client_secret, redirect_uri=redirect_uri)


async def main():
    if tochka.tokens.access_token is None:
        await tochka.get_consents_token()
        consents_request = await tochka.create_consents(PermissionsEnum.all())
        print(tochka.generate_auth_url(consent_id=consents_request.consent_id))
        await tochka.get_access_token(code=input("Code >>> "))
    
    balances = await tochka.get_balances()
    print(balances[0].amount)


asyncio.run(main())

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

tochka_api-0.0.2.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

tochka_api-0.0.2-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file tochka_api-0.0.2.tar.gz.

File metadata

  • Download URL: tochka_api-0.0.2.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for tochka_api-0.0.2.tar.gz
Algorithm Hash digest
SHA256 37795a152640e1631b0fefecfad10231bd94cbf3156958d9976cc15eaf7d005b
MD5 9ca9d348a3694264b27316f3fd1a0bd7
BLAKE2b-256 d2b7362dbc9cb433f32ff03fbe21bbe0ac796ba845f4ae5c3d6ff68819ea7d37

See more details on using hashes here.

File details

Details for the file tochka_api-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: tochka_api-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for tochka_api-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2affbd83d58a9917b1f9ddd80a9bf5ba39bf263303c8877d2b7974cb5b0c9c35
MD5 c617c46aa644fb148f6074c7f3798147
BLAKE2b-256 b26419c0cfabf6780b49cef05613ba816a4137f14514d292cb345dc400d3f2da

See more details on using hashes here.

Supported by

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