Skip to content

Commit

Permalink
Merge pull request #2 from Klynox/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
ConfidenceYobo authored Sep 14, 2021
2 parents 509fe18 + a4e0b63 commit 19e1059
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 12 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@

**/.DB_Store
**/.DS_Store

# Generated files/dirs
dist
*.egg-info/
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# pycoinpayments
================================

Overview
--------
Python API client for the `CoinPayments <https://www.coinpayments.net>`

Note: This is not the official python client for the Coinpayments API

Documentation
-------------

Please see https://www.coinpayments.net/api.php for the most up-to-date documentation for the Paystack API.

# Installation

pip install pycoinpayments

# Example
You can take a look at the `sample.py` file provided in the repo.

A basic usage would be:
```python
from pycoinpayments import CoinPayments

create_transaction_params = {
'amount': 10,
'currency1': 'USDT.BEP20',
'currency2': 'USDT.BEP20',
'buyer_email': 'confiyobo@gmail.com'
}
cp = CoinPayments(
'PrivateKey',
'PublicKey')

transaction = cp.create_transaction(create_transaction_params)

if transaction['error'] == 'ok':
print(transaction['amount'])
print(transaction['address'])
else:
print(transaction['error'])
```
3 changes: 0 additions & 3 deletions coinpayments/__init__.py

This file was deleted.

3 changes: 3 additions & 0 deletions pycoinpayments/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from pycoinpayments.coinpayments import CoinPayments

name = "pycoinpayments"
2 changes: 1 addition & 1 deletion coinpayments/apiConfig.py → pycoinpayments/apiConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import hashlib
import json

from coinpayments.errors import (MissingAuthKeyError, ImproperlyConfigured)
from pycoinpayments.errors import (MissingAuthKeyError, ImproperlyConfigured)


class ApiConfig:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from coinpayments.apiConfig import ApiConfig
from pycoinpayments.apiConfig import ApiConfig


class CoinPayments(ApiConfig):
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion coinpayments/sample.py → pycoinpayments/sample.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from coinpayments import CoinPayments
from pycoinpayments import CoinPayments

create_transaction_params = {
'amount': 10,
Expand Down
4 changes: 2 additions & 2 deletions coinpayments/version.py → pycoinpayments/version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__title__ = 'python-coinpayments-sdk'
__version__ = '0.0.1'
__title__ = 'pycoinpayments'
__version__ = '1.0.0'
__author__ = 'Klynox'
__license__ = 'MIT'
__copyright__ = 'Copyright 2016. Klynox'
17 changes: 13 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import setuptools
from coinpayments import version
from pycoinpayments import version

with open("README.md", "r") as fh:
long_description = fh.read()

setuptools.setup(
name="python-coinpayments-sdk",
name="pycoinpayments",
version=version.__version__,
author=version.__author__,
author_email="confiyobo@gmail.com",
Expand All @@ -14,11 +14,20 @@
long_description_content_type="text/markdown",
url="https://github.com/Klynox/python-coinpayments-api-wrapper",
packages=setuptools.find_packages(),
download_url='https://github.com/Klynox/python-coinpayments-api-wrapper/archive/v0.0.1.tar.gz',
download_url='https://github.com/Klynox/python-coinpayments-api-wrapper/archive/v{0}.tar.gz'.format(
version.__version__),
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
install_requires=["requests", "simplejson"],
keywords=[
'wrapper',
'sdk',
'coinpayments',
'coinpayments-sdk',
'coinpayments-api-wrapper'
],
)

0 comments on commit 19e1059

Please sign in to comment.