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.1.tar.gz
(11.3 kB
view hashes)
Built Distribution
tochka_api-0.0.1-py3-none-any.whl
(13.1 kB
view hashes)
Close
Hashes for tochka_api-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84d6575a031b70c606a0660ecb498e01c4aabbdb2c50ca0a13048f6ff758e5fd |
|
MD5 | 93fb71a3ed61facc254cdfa75e51fe5a |
|
BLAKE2b-256 | 0eef8d0bfb410839a36593ede092ef264d10b1b52715eb90c2723e306fd7e545 |