NOWPayments python API
Project description
NowPay-Python
This repo is for the python package called "nowpay"
A Python wrapper for the NOWPayments API.
The api call descriptions are from the official documentation.
Getting Started
Before using the NOWPayments API, sign up for a API key here.
If you want to use the Sandbox, request your API key here.
To install the wrapper, enter the following into the terminal.
pip install nowpay
Every api call requires this api key. Make sure to use this key when getting started.
from nowpay import NOWPayments
now_pay = NOWPayments(API_KEY)
status = now_pay.status()
Sandbox is used in the same way in correspondence with the documentation as follows.
from nowpay import NOWPayments
now_pay = NOWPayments(SANDBOX_API_KEY, True)
status = now_pay.status()
How to use the IPN
export_app() returns a WSGI app that can be hosted with waitress, gurnicorn or others
from nowpay.ipn import Ipn
def success(dictionary):
print(dictionary)
ipn = Ipn("My_IPN_Secret", success)
app = ipn.export_app()
app.run()
Breaking Changes from 1.1.1
- Renamed Function names
- status (for api status)
- currencies (for all available currencies)
- merchant_coins (for your account allowed coins)
- estimate (to estimate cost for a transaction)
- create_payment (to create a payment transaction, returns details)
- payment_status (to view payment status from id)
- min_amount (view minimum cost of a transaction allowed from 1 crypto to another)
- No more extra sandbox class (built in)
- Now use sandbox=True in the constructor
- added case support, now in sandbox mode, you are able to specify case.
- valid cases are "success", "partially_paid", "failure" to test your api
Credit
Originally written by @Ventura94
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
File details
Details for the file nowpay-2.1.0.tar.gz
.
File metadata
- Download URL: nowpay-2.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 126ab648fc7de2f9b5161032565f6b4f89b63870377674570eb7cbce2657318b |
|
MD5 | 9fd26f3f8110684d597b488edb129b06 |
|
BLAKE2b-256 | f1baf819111f31cede3da2a81159aecda57678f85f4842bd6a5136824a6f7596 |
File details
Details for the file nowpay-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: nowpay-2.1.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13694e6424b3dfefcebd06982f4fc644f55605ae4d89f0e2b94c14cd1acd978f |
|
MD5 | 0364ce532d08fb2034fdb20424d93bfe |
|
BLAKE2b-256 | 988e1a6bc12c2a2fd1afef3624921a98d40ca79688b2820868bb0f5c46ff5d41 |