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 = transaction.cancel()
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

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

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-1.0.3.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

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

arcus-1.0.3-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: arcus-1.0.3.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

File hashes

Hashes for arcus-1.0.3.tar.gz
Algorithm Hash digest
SHA256 88a97531df7bf516a060a400729141e7a2517a105576a0286665b02ab6fd5d34
MD5 31a6a4f6555c67b12f00bcbd20191dc6
BLAKE2b-256 9fcbb35c373e004497e527dcef7d29beafe5fbfacd09668e7b60ce57f56087a7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: arcus-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

File hashes

Hashes for arcus-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f7ea05da3ebb6c549d017504fd7b3c9d2d0f51c05cdde3dc330601633be9b00a
MD5 7c719980ce4cacfef5844e6b254bc23c
BLAKE2b-256 3d4f9a20fb718e919a07d963d7d82250358c18e3e5b5b802b5d8b0be85267300

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