Arteria – Python client library
Read arteria docs for all integration details.
Installation
pip install arteria-python
Authentication
To configure manually your credentials:
import arteria
ARTERIA_API_KEY = 'PKxxxx'
ARTERIA_API_SECRET= 'yyyyyy'
arteria.configure(api_key=ARTERIA_API_KEY, api_secret=ARTERIA_API_SECRET)
Transfers
Create transfer
import arteria
arteria.configure(sandbox=True) # if using sandbox
local_transfer_id = '078efdc20bab456285437309c4b75673'
transfer = arteria.Transfer.create(
recipient_name='Benito Juárez',
account_number='646180157042875763', # CLABE or card number
amount=12345, # Mx$123.45
descriptor='sending money', # As it'll appear for the customer
idempotency_key=local_transfer_id
)
# To get updated status
transfer.refresh()
Retrieve by id
import arteria
transfer = arteria.Transfer.retrieve('tr_123')
Query by idempotency_key, account_number and status
Results are always returned in descending order of created_at
The methods that can be used:
one()- returns a single result. RaisesNoResultFoundif there are no results andMultipleResultsFoundif there are more than onefirst()- returns the first result orNoneif there aren't anyall()- returns a generator of all matching results. Pagination is handled automatically as you iterate over the responsecount()- returns an integer with the count of the matching results
import arteria
# find the unique transfer using the idempotency key
local_transfer_id = '078efdc20bab456285437309c4b75673'
transfer = arteria.Transfer.one(idempotency_key=local_transfer_id)
# returns a generator of all succeeded transfers to the specific account
transfers = arteria.Transfer.all(
account_number='646180157000000004',
status='succeeded'
)
# the total number of succeeded transfers
count = arteria.Transfer.count(status='succeeded')
Api Keys
Create new ApiKey and deactivate old
import arteria
# Create new ApiKey
new = arteria.ApiKey.create()
# Have to use the new key to deactivate the old key
old_id = arteria.session.auth[0]
arteria.session.configure(new.id, new.secret)
arteria.ApiKey.deactivate(old_id, 60) # revoke prior API key in an hour
Metadata
Release files for arteria-python 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| arteria-python-0.0.1.tar.gz | 3.4 kB | Without provenance | Details for arteria-python-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| arteria_python-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for arteria_python-0.0.1-py3-none-any.whl |
Total release size: 7.0 kB
Release files / arteria-python-0.0.1.tar.gz
| Download URL | arteria-python-0.0.1.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0fb652572768609a9f1126f38316392e9da51f7984ac3e76023bdeb4bc97ef6
|
|
BLAKE2b-256 checksum How to use checksums |
155c018489323ebad4a86973a8f479fa651cc3d072d507258392a0a810fb2d30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / arteria_python-0.0.1-py3-none-any.whl
| Download URL | arteria_python-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f1ee1729b94a2953c91644dc4f4ed87b6e76e0088791c6075d40a61e998645f
|
|
BLAKE2b-256 checksum How to use checksums |
dd104af15e2e946187b812b3314d42878710a5278ab29259d301c578e6802d00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for arteria-python 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.