Recurly Python Client
Python
Latest commit bc6c324 Aug 18, 2016 @csmb csmb committed on GitHub Merge pull request #182 from recurly/bump_2_4_0
Bump 2.4.0
Failed to load latest commit information.
recurly Bump 2.4.0 Aug 18, 2016
tests
.gitignore Adding travis file Jan 3, 2014
.travis.yml gift card support Aug 18, 2016
CHANGELOG Bump 2.4.0 Aug 18, 2016
LICENSE Bump version for changes Oct 26, 2011
MANIFEST.in Include README.rst instead of .md Jul 25, 2012
README.rst Remove old python references from readme Aug 18, 2016
setup.cfg Mark as 2.1.3 final Jul 16, 2012
setup.py Updating docs links Aug 3, 2015

README.rst

Recurly Python Client

https://travis-ci.org/recurly/recurly-client-python.png?branch=master

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'

Recurly Python Client Tests

To run these tests, use the unittest test runner:

$ python -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 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

Usage

Please see the Recurly API for more information.

Support

IRC

If you have general questions about the library or integration, you may find some of us in the #recurly irc channel on the Freenode network.