Skip to main content

The official Recurly API client

Project description

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

_NOTE_: The unit tests require certain packages to be installed on your system. Install the following packages with pip:

$ pip install 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 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

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

recurly-2.9.11.tar.gz (71.1 kB view details)

Uploaded Source

Built Distribution

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

recurly-2.9.11-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

Details for the file recurly-2.9.11.tar.gz.

File metadata

  • Download URL: recurly-2.9.11.tar.gz
  • Upload date:
  • Size: 71.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/18.5 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.10

File hashes

Hashes for recurly-2.9.11.tar.gz
Algorithm Hash digest
SHA256 105262cab284ecd4d0555fb506c6e2f21ce3dfb1cb3e931adb0a6243b52d76ed
MD5 c5caf4208fbc1aff964b3479865dbb94
BLAKE2b-256 6f820427c0c72a0c0ff1461eae7512cbe791e395b7326cb46a8fd9119b26c568

See more details on using hashes here.

File details

Details for the file recurly-2.9.11-py3-none-any.whl.

File metadata

  • Download URL: recurly-2.9.11-py3-none-any.whl
  • Upload date:
  • Size: 25.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/18.5 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.10

File hashes

Hashes for recurly-2.9.11-py3-none-any.whl
Algorithm Hash digest
SHA256 739f6d07abf2f738b1beec560f43cef932c9b9bc7ae728b9cc405f8197f6ee00
MD5 59a84305e3fb7f2b1fbd0c1f658d700f
BLAKE2b-256 6402ae85f436d1521b849eb467f2e1cd1aea1a9299d9bd826c6374216dc3e6b3

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 Pingdom Monitoring Sentry Error logging StatusPage Status page