PyTeleBirr is mostly Telebirr With Python
Examples
|
Documentation
|
Channel
Installation
pip3 install -U pytelebirr
or
pip3 install -U git+https://github.com/TeleBirrApi/PyTeleBirr.git
Usage
from pytelebirr import PyTeleBirr
phone_no = "<YOUR_PHONE_NUMBER_STARTS_FROM_9>" # Example 91234567
passwd = "<YOUR_PASSWORD>"
# To get Device id use
# You have to use this function one time.
from pytelebirr.utils import get_device_id
device_id = get_device_id(
phone=phone_no,
passwd=passwd,
d_id="<Your Mobile Device ID>" # to get this for android users use device id app for iphone users ¯\_(ツ)_/¯
)
# after calling this function verification code will be sent via sms check 127
# Code has been sent via sms
# Enter The Code You Received : enter your code here
# and you will get this message on terminal/cmd Your Device_id : ...
# Initialize PyTelebirr
telebirr = PyTeleBirr(
device_id=device_id,
phone_no=phone_no,
passwd=passwd,
)
# get your balance
balance = telebirr.get_balance()
# this returns dict
balance['balance']
# 999999.00
# generate beautiful qr code
# now you can custom your qr code size and background color and payment amount
img_path = telebirr.generate_qrcode(
amount=5, # 5 in birr
size=200, # optional
bg_color="ffffff" # color don't use #
)
# this return image path
# refresh token tokens will expire in 86400s after login
telebirr.refresh_token()
# this will refresh token
# on payment received method you can pass callable
telebirr.on_payment(
on_payment=lambda m: print(m)
)
# when payment received on_payment function will be called
# to check if transaction exists
# returns bool or dict
telebirr.check_tx(
"ABCDE"
)
# if tx id exists will return dict elase false
# this method can check all telebirr transaction so be careful
# check if the tx id payment was sent to me
telebirr.is_my_tx(
"ABCDE"
)
# returns bool if tx id was sent to me returns True else False
# scan qr code
# scan the receiver qr code and pass the content
telebirr.scan_qr(
"1234567890"
)
# returns dict data of user including phone number ;)
# send payment to user via qr code
telebirr.send_payment(
amount=5,
phone="1234567890",
content="123456789" # content of qr code
)
# returns dict
# get your token
telebirr.get_token()
# returns str your token
Features
- Python solution.
- Send payment via qr code and phone number
- Checking balance
- Generating beautiful qr code
- you can custom your qr code
- Checking transactions
- Waiting for payment and call function
Metadata
Release files for pytelebirr 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytelebirr-0.2.5.tar.gz | 9.0 kB | Without provenance | Details for pytelebirr-0.2.5.tar.gz |
Release files / pytelebirr-0.2.5.tar.gz
| Download URL | pytelebirr-0.2.5.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4f16a85922f0afe1e15d2948d5836fad431cfc8a3097269d59a4d30cd6b11f59
|
|
BLAKE2b-256 checksum How to use checksums |
59be43d7af0af6dfb996280d480347978c94152de606f19ca6c3ccac98cf31ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.9
|
Security for pytelebirr 0.2.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.