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.4.tar.gz
(12.8 kB
view details)
Built Distribution
File details
Details for the file tochka_api-0.0.4.tar.gz
.
File metadata
- Download URL: tochka_api-0.0.4.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b95767393bfc9e33b3a1fcd96545515e49bcf933cac570819d2a95337f6d402 |
|
MD5 | c1137a9c4d2b739823f0089462c27687 |
|
BLAKE2b-256 | 95060eb84cc9ede000f5c4518470bf8683c0e6296ce8386ae8228f7154fcecd0 |
File details
Details for the file tochka_api-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: tochka_api-0.0.4-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38e5cb6b8028c7bb6caf6de718bee5f3c3747b81897e4596b684cb013bf17e0a |
|
MD5 | 11b676eace48f5d10a4daa95715a4963 |
|
BLAKE2b-256 | 89c82fa91dd325fef6cce8b14c187d489ca769c751ec5b0f3e437caf8918999c |