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.3.tar.gz
(12.1 kB
view details)
Built Distribution
File details
Details for the file tochka_api-0.0.3.tar.gz
.
File metadata
- Download URL: tochka_api-0.0.3.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96b8bfba4b8889a98b5e7b8b2730622899b4423af98b4527a3b104fa45591215 |
|
MD5 | 83ec190a72be87d0eba1eb5e25dbd3f0 |
|
BLAKE2b-256 | cd11dbe3aab97151c7e457eb2c03fd6cf1bf310d243a8db6d7f716c8ecb80cbc |
File details
Details for the file tochka_api-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: tochka_api-0.0.3-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e0bd290c54186f012d90374738a50256c03fe0fdb53212c6341cd6c17c0c639 |
|
MD5 | ce4ddce807c3d5b0f290076946c0619e |
|
BLAKE2b-256 | 66f749103941e1e43ee1f49020d2a266908f0b5e729d86c73223299c691936af |