Skip to main content

arcus-python

Build Status Coverage Status PyPI

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()

# show transaction
transaction = client.transactions.get(transaction.id)

# cancel transaction
cancellation = client.transactions.cancel(transaction.id)
assert cancellation.code == 'R0'
assert cancellation.message == 'Transaction successful'

# verify cancellation
updated_transaction = client.transactions.get(transaction.id)
assert updated_transaction.id == transaction.id
assert updated_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

Release to PyPi

  1. Update version in setup.py
  2. Commit changes to setup.py and push to origin/master
  3. git tag -a <version> -m <release message>
  4. git push origin --tags

TravisCI will release the updated version to PyPi after verifying the tests pass.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arcus-0.1.2.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arcus-0.1.2-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file arcus-0.1.2.tar.gz.

File metadata

  • Download URL: arcus-0.1.2.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for arcus-0.1.2.tar.gz
Algorithm Hash digest
SHA256 34be2f52dbc771c99580413a8f384365b18013099845b11df5e6f66d519f3338
MD5 69d0dc29b6b3679e80ac8971ba07c3f1
BLAKE2b-256 7177a6c113680cea8a3057b5bce05c70ccea4237beae719bc878ad44d1abccdb

See more details on using hashes here.

File details

Details for the file arcus-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: arcus-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for arcus-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 175c09fd89659068a4a80e9499388d92ad6c6bc4cebb183590e19ae8dd89d114
MD5 3d98868909db1062a85a96f88ff575e3
BLAKE2b-256 39415a29f8c953229127e90bed7947b1c80b45effccdc29a40d56c96ae5a5f9b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page