diff --git a/.gitignore b/.gitignore index 54e0ab7..59ee2e7 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,7 @@ **/.DB_Store **/.DS_Store + +# Generated files/dirs +dist +*.egg-info/ \ No newline at end of file diff --git a/README.md b/README.md index e69de29..f27a77c 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,43 @@ +# pycoinpayments +================================ + +Overview +-------- +Python API client for the `CoinPayments ` + +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']) +``` diff --git a/coinpayments/__init__.py b/coinpayments/__init__.py deleted file mode 100644 index 7195fce..0000000 --- a/coinpayments/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from coinpayments.coinpayments import CoinPayments - -name = "coinpayments" diff --git a/pycoinpayments/__init__.py b/pycoinpayments/__init__.py new file mode 100644 index 0000000..14ab243 --- /dev/null +++ b/pycoinpayments/__init__.py @@ -0,0 +1,3 @@ +from pycoinpayments.coinpayments import CoinPayments + +name = "pycoinpayments" diff --git a/coinpayments/apiConfig.py b/pycoinpayments/apiConfig.py similarity index 97% rename from coinpayments/apiConfig.py rename to pycoinpayments/apiConfig.py index 976cb75..685d11f 100644 --- a/coinpayments/apiConfig.py +++ b/pycoinpayments/apiConfig.py @@ -9,7 +9,7 @@ import hashlib import json -from coinpayments.errors import (MissingAuthKeyError, ImproperlyConfigured) +from pycoinpayments.errors import (MissingAuthKeyError, ImproperlyConfigured) class ApiConfig: diff --git a/coinpayments/coinpayments.py b/pycoinpayments/coinpayments.py similarity index 99% rename from coinpayments/coinpayments.py rename to pycoinpayments/coinpayments.py index 7472797..0b81c03 100644 --- a/coinpayments/coinpayments.py +++ b/pycoinpayments/coinpayments.py @@ -1,4 +1,4 @@ -from coinpayments.apiConfig import ApiConfig +from pycoinpayments.apiConfig import ApiConfig class CoinPayments(ApiConfig): diff --git a/coinpayments/errors.py b/pycoinpayments/errors.py similarity index 100% rename from coinpayments/errors.py rename to pycoinpayments/errors.py diff --git a/coinpayments/sample.py b/pycoinpayments/sample.py similarity index 94% rename from coinpayments/sample.py rename to pycoinpayments/sample.py index ff17b26..1edf57d 100644 --- a/coinpayments/sample.py +++ b/pycoinpayments/sample.py @@ -1,4 +1,4 @@ -from coinpayments import CoinPayments +from pycoinpayments import CoinPayments create_transaction_params = { 'amount': 10, diff --git a/coinpayments/version.py b/pycoinpayments/version.py similarity index 58% rename from coinpayments/version.py rename to pycoinpayments/version.py index 8245807..1191e3e 100644 --- a/coinpayments/version.py +++ b/pycoinpayments/version.py @@ -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' diff --git a/setup.py b/setup.py index be1fa9c..26829a7 100644 --- a/setup.py +++ b/setup.py @@ -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", @@ -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' + ], )