Skip to main content

Telebirr with python

Project description

Pytelebirr
PyTeleBirr is mostly Telebirr With Python
Examples | Documentation | Channel

Installation

pip3 install pytelebirr

Usage

from pytelebirr import PyTeleBirr

# Initialize PyTelebirr
telebirr = PyTeleBirr(
    device_id="<YOUR_DEVICE_ID>",
    phone_no="<YOUR_PHONE>",
    passwd="<YOUR_PASSWORD>",
)
# get your balance
balance = telebirr.get_balance()
# this returns object
balance['balance']
# 999999.00

# generate beautiful qr code
img_path = telebirr.generate_qrcode()
# 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

Features

  • Python solution.
  • Send payment via qr code and phone number
  • Checking balance
  • Generating beautiful qr code
  • Checking transactions
  • Waiting for payment and call function

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

pytelebirr-0.2.1.tar.gz (19.4 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page