arcus-python
Arcus python3.6 + 3.7 client library for API version 3.1 of Arcus.
Install
$ pip install arcus
Testing
$ make test
Authentication and account info
Current version support direct endpoint calls.
from arcus.client import Client
# Create an Arcus client instance
client = Client('your-api-key', 'your-secret-key')
# Get account info
account_info = client.get('/account')
# create bill
account_info = dict(biller_id=40, account_number='501000000007')
bill = client.post('/bills', account_info)
Pay bills
from arcus import Client
client = Client('your-api-key', 'your-secret-key')
# create bill
bill = client.bills.create(40, '501000000007')
# pay bill
transaction = bill.pay()
# refresh transaction
transaction.refresh()
# cancel transaction
cancellation = transaction.cancel()
assert cancellation['code'] == 'R0'
assert cancellation['message'] == 'Transaction successful'
assert transaction.status == 'refunded'
Top-up
from arcus import Client
client = Client('your-api-key', 'your-secret-key')
biller_id = 808080
phone_number = '5599992222'
amount = 100.0
# by default, currency is MXN
topup = client.topups.create(biller_id, phone_number, amount)
assert topup.bill_amount == 100.0
Billers list
You can list all active billers or filter in a specific field
from arcus.client import Client
# Create an Arcus client instance
client = Client('your-api-key', 'your-secret-key')
# Get all billers in Mexico which use MXN as currency
mx_biller_list = client.biller.list(country='MX', currency='MXN')
# Get all billers with an specific biller_type
electricity_biller_list = client.biller.list(biller_type='Electricity')
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
arcus-1.2.2.tar.gz
(11.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
arcus-1.2.2-py3-none-any.whl
(17.3 kB
view details)
File details
Details for the file arcus-1.2.2.tar.gz.
File metadata
- Download URL: arcus-1.2.2.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.1.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cadaceeb5a0e819d4b9a4ff78506c55203f9c86aa24c1fdbb96e43dcd79c58e
|
|
| MD5 |
4a6f8a736f82c39462dc94635f97ad48
|
|
| BLAKE2b-256 |
27576be7d0ddf8cd0f2c56ce9a502b69f16535519c97c17a8f8336d4b4d4580c
|
File details
Details for the file arcus-1.2.2-py3-none-any.whl.
File metadata
- Download URL: arcus-1.2.2-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.1.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
946fabe9da60a50dabf1717782e3408f60f5acc99efcf1a01efa9f259f9d7ed4
|
|
| MD5 |
b6d079339e0e33d0f115858ed0eef528
|
|
| BLAKE2b-256 |
8d3cca17f90b6449217ad9cc165f7da43aad8b0bf24a167c829c88bbc9402a9d
|