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

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

arcus-0.2.4-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for arcus-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2bb222a83c22b4056d0271e7d270879ae49574a90483d923e0c570d5e21ec4c8
MD5 d0fa08ca525b16eab5e2b768cfeafa07
BLAKE2b-256 64f1ae735e805c8046c9a948f25f01648179a49dc6142c8ac576a146a844a1cb

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