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
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:
Update the CHANGELOG to describe what feature have been added.
Bump the version number in chargehound/version.py and setup.py
Rebuild and deploy the package with: python setup.py sdist
Upload the distributable to PyPi using: twine upload dist/{name_of_generated_package}
Confirm the new package version is available at https://pypi.python.org/pypi/chargehound
Metadata
Release files for chargehound 2.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| chargehound-2.5.0.tar.gz | 6.7 kB | Without provenance | Details |
Release files / chargehound-2.5.0.tar.gz
| Download URL | chargehound-2.5.0.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
479736e9beb1859d3d83ce476c8f9de5f1ec2ed71a1f3ed305a73c2a4ff998b6
|
|
BLAKE2b-256 checksum How to use checksums |
7b2e402ebfa1033cbf5592a0fc084288d23464c0136e9675f274338855013ec9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.7
|
Security for chargehound 2.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.