This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Chargehound Python Bindings

Project Description

Installation

pip install chargehound

Usage

Import chargehound and set your API key.

import chargehound
chargehound.api_key = '{ YOUR_API_KEY }'

Requests

Every resource is accessed via the Chargehound module.

dispute = chargehound.Disputes.submit('dp_123', fields={'customer_name': 'Susie'})

Response

Responses from the API are automatically parsed from JSON and returned as Python objects.

Responses also include the HTTP status code on the response object as the status field.

dispute = chargehound.Disputes.retrieve('dp_123')

print dispute.state
# 'needs_response'
print dispute.response.status
# 200

Documentation

Disputes

Errors

Development

To build and install from the latest source:

$ git clone git@github.com:chargehound/chargehound-python.git
$ pip install -r dev_requirements.txt

Run tests:

$ python setup.py test

Deployment

If you added a new depency, make sure the change is reflected in the requirements.txt file (for unit tests), the dev_requirements.txt file (for module publishers) and the setup.py file (for module consumers).

To deploy a new version of the SDK, you will need Pandoc (http://pandoc.org/) installed. Pandoc will convert the README.md into the .rst format required for the Python repository. Instructions are here: http://pandoc.org/installing.html.

Next, install PyPandoc, the Python wrapper for Pandoc, following these instructions.

The last pre-requisite is Twine, a utility for interacting with PyPi.

Once Pandoc, PyPandoc and Twine are installed, you can build and deploy a new module to PyPi with the following steps:

  1. Update the CHANGELOG to describe what feature have been added.
  2. Bump the version number in chargehound/version.py and setup.py
  3. Rebuild and deploy the package with: python setup.py sdist
  4. Upload the distributable to PyPi using: twine upload dist/{name_of_generated_package}
  5. Confirm the new package version is available at https://pypi.python.org/pypi/chargehound
Release History

Release History

This version
History Node

2.1.2

History Node

2.1.1

History Node

2.1.0

History Node

2.0.0

History Node

1.2.0

History Node

1.1.1

History Node

1.1.0

History Node

1.0.6

History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
chargehound-2.1.2.tar.gz (6.0 kB) Copy SHA256 Checksum SHA256 Source Jun 1, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting