The official Recurly API client
Project description
Recurly’s Python client library is an interface to its REST API.
Python Versions
The minimum supported requirements for this library are:
Python >= 2.7.9
OpenSSL >= 1.0.1
Installation
Recurly is packaged as a Python package. We recommend you install it with PyPI by adding it to your requirements.txt:
pip install recurly
Configuration
Set your API key and optionally set a certificate authority certificate file and default currency:
import recurly recurly.SUBDOMAIN = 'your-subdomain' recurly.API_KEY = '012345678901234567890123456789ab' # Set a certificate authority certs file to validate Recurly's certificate recurly.CA_CERTS_FILE = '/etc/pki/tls/certs/ca-bundle.crt' # Set a default currency for your API requests recurly.DEFAULT_CURRENCY = 'USD'
A Note on Headers
In accordance with section 4.2 of RFC 2616, HTTP header fields are case-insensitive.
Recurly Python Client Tests
_NOTE_: The unit tests require certain packages to be installed on your system. Install the following packages with pip:
$ pip install defusedxml six mock iso8601 backports.ssl-match-hostname
To run these tests, use the unittest test runner with the RECURLY_INSECURE_DEBUG environment variable set to ‘true’:
$ RECURLY_INSECURE_DEBUG=true python3 -m unittest discover -s tests
The resource tests in test_resources.py will run using the HTTP fixtures in tests/fixtures. To run the tests against a live Recurly API endpoint, configure your Recurly test account and use its API key in the RECURLY_API_KEY environment variable:
$ RECURLY_API_KEY=1274…54e3 python3 -m unittest tests.test_resources
The live Recurly API endpoint can also be tested while validating the server certificate with the RECURLY_CA_CERTS_FILE environment variable, which should be a filename of concatenated certificate authority X.509 certificates:
$ RECURLY_API_KEY=1274…54e3 RECURLY_CA_CERTS_FILE=/etc/pki/tls/certs/ca-bundle.crt -m unittest tests.test_resources
Usage
Please see the Recurly API for more information.
Support
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file recurly-2.10.2.tar.gz.
File metadata
- Download URL: recurly-2.10.2.tar.gz
- Upload date:
- Size: 93.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1b9127f08488f6d8a34c41b4b3d564566af819b4691fb23cb842836b593f016
|
|
| MD5 |
fa7454c281c6ac043f791e5a2c4012eb
|
|
| BLAKE2b-256 |
f41db493a9ce022f45a0d2e5a6e0a3b923deb878b639d5f825718b354c74ec20
|
File details
Details for the file recurly-2.10.2-py3-none-any.whl.
File metadata
- Download URL: recurly-2.10.2-py3-none-any.whl
- Upload date:
- Size: 29.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b089792226c83e02d54c231c7fef836800033747dc52064eca422bce8209fc5
|
|
| MD5 |
9ca8d2c974d7d3098574825dd36bf84a
|
|
| BLAKE2b-256 |
fb8a3ae81a7e0a480586c7c5178177fa45f1c109a4ae82a1991ba9c108804ce6
|