skip to navigation
skip to content

Not Logged In

recurly 2.2.17

The official Recurly API client

Recurly’s Python client library is an interface to its REST API.


Recurly is packaged as a Python package. We recommend you install it with PyPI by adding it to your requirements.txt:

pip install recurly


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 Python Client Tests

To run these tests in Python 2.7, use the unittest test runner:

$ python -m unittest discover -s tests

Under Python 2.6 or earlier, install the unittest2 distribution and use it instead:

$ pip install unittest2 # or easy_install $ python -m unittest2 discover -s tests

The resource tests in 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 python -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


Please see the Recurly API for more information.

File Type Py Version Uploaded on Size
recurly-2.2.17.tar.gz (md5) Source 2015-10-02 47KB
  • Downloads (All Versions):
  • 189 downloads in the last day
  • 2908 downloads in the last week
  • 12310 downloads in the last month