Skip to content

Botifi/billzio-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

billzio-api

Asynchronous Python wrapper for Billz.io Public API (v2)

Installation

pip install billzio-api

Supported Billz API methods

  • Auth login
  • Get Products list
  • Get Categories list
  • Get Shops list
  • Get Currencies list
  • Get Payment types list
  • Get Brands list
  • Get all Clients
  • Create a new Client
  • Update a Client
  • Create a new order
    • Create a draft Order
    • Add an Item (product) to the draft Order
    • Add a Consumer to the draft Order
    • Create an Order from the draft Order (make payment)

Usage:

from billzio_api import BillzHandler, ShopsListFilters

handler = BillzHandler("<secret_key>")
filters = ShopsListFilters(limit=1)
shops = handler.get_shops(filters)
print(shops.count)
print(shops.shops)

Asynchronous

import asyncio  # for running synchronously

from billzio_api import AsyncBillzHandler, ShopsListFilters

...
handler = AsyncBillzHandler("<secret_key>")
filters = ShopsListFilters(limit=1)
shops = asyncio.run(handler.get_shops(filters))
print(shops.count)
print(shops.shops)

TODO

  • Upload to PyPi as a python package
  • Synchronous handler
  • Write unit tests
  • Caching auth data with its expiration