BTCPay Python SDK using the Greenfield API
Project description
BTCPay Python SDK
BTCPay had a Python SDK, but it was using the old legacy API, meaning the way to connect was outdated as well as the API responses it was giving. This library uses the Greenfield API and will follow the documentation provided by the BTCPay Server team.
As of right now, this is a work in progress and will be updated to add more API calls
Installation
You don't need this source code unless you want to modify the package. If you just want to use the package, run the command:
pip install btcpay-python-sdk
Install from source with:
python setup.py install
Dependencies
- Python 2.7+
- Requests
- Setuptools
Usage
The library needs to be configured with your stores api key, store id, and host url.
To generate an API key, you need to log in to your BTCPay instance, click "Account" in the lower left corner, click "Manage Account", click the "API Keys" tab, and then generate your key.
import btcpay
btcpay.api_key = 'API_KEY_HERE' # should use an env variable
btcpay.host_url = 'HOST_URL'
btcpay.store_id = 'STORE_ID'
# get all invoices
invoices = btcpay.Invoices.get_invoices()
print(invoices)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file btcpay-python-sdk-0.1.0.tar.gz.
File metadata
- Download URL: btcpay-python-sdk-0.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdf6eb480412dfddaf063d50d41fdcba76a413818649bbe5ea2910f54643056f
|
|
| MD5 |
a30a3dd9b48414ed9261bbdc1e44bb82
|
|
| BLAKE2b-256 |
af52cb03a351a14ca08a82eb24dfe33583618e9a453f5e352b50f991e461129d
|
File details
Details for the file btcpay_python_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: btcpay_python_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5763d894770f145192154009501841c3d517da3500b55fe27fa884a7dd6a249
|
|
| MD5 |
ab894c502b7b38cae88904e3b1d76f5b
|
|
| BLAKE2b-256 |
9402c3a813a0dad97ad9313d9854578a5a2e62f5044e804731c711524786f099
|