CryptomusAPI


NameCryptomusAPI JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/Fsoky/CryptomusAPI
SummaryEasy interaction with Cryptomus API, support for asynchronous approaches
upload_time2023-11-25 13:07:27
maintainer
docs_urlNone
authorFsoky
requires_python
licenseMIT
keywords api cryptomus asyncio crypto cryptomusapi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
      <a href="https://imgur.com/osbyhki"><img src="https://i.imgur.com/osbyhki.png" title="source: imgur.com" /></a>
</p>

<p align="center">
    <img src="https://img.shields.io/badge/Version-1.0.0-blueviolet" alt="Project Version">
    <img src="https://img.shields.io/badge/License-MIT-success" alt="License">
</p>
<p align="center">
    <a href="https://git.io/typing-svg"><img src="https://readme-typing-svg.demolab.com?font=Fira+Code&pause=1000&color=0BE67A&center=true&vCenter=true&random=false&width=435&lines=Cryptomus;Crypto+Payment+Gateway" alt="Typing SVG" /></a>
</p>

<h1 align="center"> What are Cryptomus crypto payment gateway features?</h1>
<a href="https://imgur.com/f2PAMBG"><img src="https://i.imgur.com/f2PAMBG.png" title="source: imgur.com" width="128" height="128" align="left"/></a>
<div align="right">
  <h3>🛡 Volatility protection</h3>
  <p>
        Automatic conversion of incoming payments into stablecoins will protect against cryptocurrency volatility. <br/>
        The Withdrawal auto-convert feature allows you to withdraw your crypto in a preferred currency, and both features are completely free to use!
  </p>
</div>

<div>
  <a href="https://imgur.com/jFuoTL3"><img src="https://i.imgur.com/jFuoTL3.png" title="source: imgur.com" align="right"/></a>
  <h3>âš™ Transactions status management</h3>
  <ul>
    <li>Adjust the allowed payment accuracy.</li>
    <li>View if an invoice has been overpaid or underpaid and send an additional invoice to collect a remaining amount.</li>
  </ul>
</div>

<div align="right">
  <a href="https://imgur.com/E4hdG1q"><img src="https://i.imgur.com/E4hdG1q.png" title="source: imgur.com" align="left"/></a>
  <h3>% Flexible commissions for each coin</h3>
  <p>Set additional commissions or add a discount for chosen coins.</p>
</div><br/>

<div>
  <a href="https://imgur.com/XX4pNgu"><img src="https://i.imgur.com/XX4pNgu.png" title="source: imgur.com" align="right"/></a>
  <h3>💬 Support team</h3>
  <ul>
    <li>Telegram</li>
    <li>Email</li>
    <li>Our website in the form of tickets</li>
    <li>As a personal manager for our merchants</li>
  </ul>
</div>

<div align="right">
  <a href="https://imgur.com/mbJvIPu"><img src="https://i.imgur.com/mbJvIPu.png" title="source: imgur.com" align="left"/></a>
  <h3>📄 Mass payouts</h3>
  <p>
        Make mass payouts to thousands of addresses with automatic conversion in just one moment. <br/>
        <a href="https://cryptomus.com/processing">All features</a>
  </p>
</div><br/>

<h1 align="center">About This Project</h1>
<p align="center">
This project is written on pure enthusiasm, I want this library to be usable and used regularly. This project has the ability to run synchronously or asynchronously, which makes it more flexible.
The project will be maintained and improved, and you can buy me a coffee :)
Thanks, have a good day!
</p>

<div align="center">
      <a href="https://www.buymeacoffee.com/fsoky" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;"></a>
</div>

<h1 align="center">Installation</h1>

- Installation using the pip package manager
```bash
$ pip install CryptomusAPI
```
- Install from GitHub *(requires [git](https://git-scm.com/downloads))*
```bash
$ git clone https://github.com/Fsoky/CryptomusAPI
$ cd CryptomusAPI
$ python setup.py install
```
- Or
```bash
$ pip install git+https://github.com/Fsoky/CryptomusAPI
```

<h1 align="center">Get Started</h1>

> [!TIP]
> Refer to the documentation in any unclear situation: https://doc.cryptomus.com/ \
> To get **MERCHANT_ID** and **API_KEY** register and send an application to https://cryptomus.com/
> 
> _âš  Make sure you have a **ready project** in which you will connect **Cryptomus** otherwise the key will not be issued!_

- You can use the asynchronous manager with
```python
import asyncio
from CryptomusAPI import Cryptomus

MERCHANT_ID = "123ABC"
API_KEY = "12345ABCDE"


async def main() -> None:
    async with Cryptomus(MERCHANT_ID, API_KEY) as api:
        ...


if __name__ == "__main__":
    asyncio.run(main())
```

- Or you can simply create an instance of the Cryptomus class
```python
api = Cryptomus(MERCHANT_ID, API_KEY)
```

### Creating an invoice
```python
await api.payments.create_invoice(
    amount=10,
    order_id="TEST-ORDER-1", # This parameter must not contain spaces.
    currency="USD", # or crypto currency like TON
    lifetime=300 # Invoice lifetime (in seconds), default 3600
)
```

> [!TIP]
> Enums can be used for parameters
```python
from CryptomusAPI.enums import CryptoCurrency
...create_invoice(..., currency=CryptoCurrency.USDT)
```

#### Obtaining data from a method
```python
invoice = await api.payments.create_invoice(...)
print(invoice.result.url) # >>> https://...
```

_The module is under development, please be patient, thank you!_



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Fsoky/CryptomusAPI",
    "name": "CryptomusAPI",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "api cryptomus asyncio crypto cryptomusapi",
    "author": "Fsoky",
    "author_email": "cyberuest0x12@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/71/9b/0f7be5696b85ed1c100c1c5d5f06c51d2715ccc15246d0c0f8c77e3fb657/CryptomusAPI-1.0.1.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n      <a href=\"https://imgur.com/osbyhki\"><img src=\"https://i.imgur.com/osbyhki.png\" title=\"source: imgur.com\" /></a>\n</p>\n\n<p align=\"center\">\n    <img src=\"https://img.shields.io/badge/Version-1.0.0-blueviolet\" alt=\"Project Version\">\n    <img src=\"https://img.shields.io/badge/License-MIT-success\" alt=\"License\">\n</p>\n<p align=\"center\">\n    <a href=\"https://git.io/typing-svg\"><img src=\"https://readme-typing-svg.demolab.com?font=Fira+Code&pause=1000&color=0BE67A&center=true&vCenter=true&random=false&width=435&lines=Cryptomus;Crypto+Payment+Gateway\" alt=\"Typing SVG\" /></a>\n</p>\n\n<h1 align=\"center\"> What are Cryptomus crypto payment gateway features?</h1>\n<a href=\"https://imgur.com/f2PAMBG\"><img src=\"https://i.imgur.com/f2PAMBG.png\" title=\"source: imgur.com\" width=\"128\" height=\"128\" align=\"left\"/></a>\n<div align=\"right\">\n  <h3>\ud83d\udee1 Volatility protection</h3>\n  <p>\n        Automatic conversion of incoming payments into stablecoins will protect against cryptocurrency volatility. <br/>\n        The Withdrawal auto-convert feature allows you to withdraw your crypto in a preferred currency, and both features are completely free to use!\n  </p>\n</div>\n\n<div>\n  <a href=\"https://imgur.com/jFuoTL3\"><img src=\"https://i.imgur.com/jFuoTL3.png\" title=\"source: imgur.com\" align=\"right\"/></a>\n  <h3>\u2699 Transactions status management</h3>\n  <ul>\n    <li>Adjust the allowed payment accuracy.</li>\n    <li>View if an invoice has been overpaid or underpaid and send an additional invoice to collect a remaining amount.</li>\n  </ul>\n</div>\n\n<div align=\"right\">\n  <a href=\"https://imgur.com/E4hdG1q\"><img src=\"https://i.imgur.com/E4hdG1q.png\" title=\"source: imgur.com\" align=\"left\"/></a>\n  <h3>% Flexible commissions for each coin</h3>\n  <p>Set additional commissions or add a discount for chosen coins.</p>\n</div><br/>\n\n<div>\n  <a href=\"https://imgur.com/XX4pNgu\"><img src=\"https://i.imgur.com/XX4pNgu.png\" title=\"source: imgur.com\" align=\"right\"/></a>\n  <h3>\ud83d\udcac Support team</h3>\n  <ul>\n    <li>Telegram</li>\n    <li>Email</li>\n    <li>Our website in the form of tickets</li>\n    <li>As a personal manager for our merchants</li>\n  </ul>\n</div>\n\n<div align=\"right\">\n  <a href=\"https://imgur.com/mbJvIPu\"><img src=\"https://i.imgur.com/mbJvIPu.png\" title=\"source: imgur.com\" align=\"left\"/></a>\n  <h3>\ud83d\udcc4 Mass payouts</h3>\n  <p>\n        Make mass payouts to thousands of addresses with automatic conversion in just one moment. <br/>\n        <a href=\"https://cryptomus.com/processing\">All features</a>\n  </p>\n</div><br/>\n\n<h1 align=\"center\">About This Project</h1>\n<p align=\"center\">\nThis project is written on pure enthusiasm, I want this library to be usable and used regularly. This project has the ability to run synchronously or asynchronously, which makes it more flexible.\nThe project will be maintained and improved, and you can buy me a coffee :)\nThanks, have a good day!\n</p>\n\n<div align=\"center\">\n      <a href=\"https://www.buymeacoffee.com/fsoky\" target=\"_blank\"><img src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me A Coffee\" style=\"height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;\"></a>\n</div>\n\n<h1 align=\"center\">Installation</h1>\n\n- Installation using the pip package manager\n```bash\n$ pip install CryptomusAPI\n```\n- Install from GitHub *(requires [git](https://git-scm.com/downloads))*\n```bash\n$ git clone https://github.com/Fsoky/CryptomusAPI\n$ cd CryptomusAPI\n$ python setup.py install\n```\n- Or\n```bash\n$ pip install git+https://github.com/Fsoky/CryptomusAPI\n```\n\n<h1 align=\"center\">Get Started</h1>\n\n> [!TIP]\n> Refer to the documentation in any unclear situation: https://doc.cryptomus.com/ \\\n> To get **MERCHANT_ID** and **API_KEY** register and send an application to https://cryptomus.com/\n> \n> _\u26a0 Make sure you have a **ready project** in which you will connect **Cryptomus** otherwise the key will not be issued!_\n\n- You can use the asynchronous manager with\n```python\nimport asyncio\nfrom CryptomusAPI import Cryptomus\n\nMERCHANT_ID = \"123ABC\"\nAPI_KEY = \"12345ABCDE\"\n\n\nasync def main() -> None:\n    async with Cryptomus(MERCHANT_ID, API_KEY) as api:\n        ...\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n- Or you can simply create an instance of the Cryptomus class\n```python\napi = Cryptomus(MERCHANT_ID, API_KEY)\n```\n\n### Creating an invoice\n```python\nawait api.payments.create_invoice(\n    amount=10,\n    order_id=\"TEST-ORDER-1\", # This parameter must not contain spaces.\n    currency=\"USD\", # or crypto currency like TON\n    lifetime=300 # Invoice lifetime (in seconds), default 3600\n)\n```\n\n> [!TIP]\n> Enums can be used for parameters\n```python\nfrom CryptomusAPI.enums import CryptoCurrency\n...create_invoice(..., currency=CryptoCurrency.USDT)\n```\n\n#### Obtaining data from a method\n```python\ninvoice = await api.payments.create_invoice(...)\nprint(invoice.result.url) # >>> https://...\n```\n\n_The module is under development, please be patient, thank you!_\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Easy interaction with Cryptomus API, support for asynchronous approaches",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/Fsoky/CryptomusAPI"
    },
    "split_keywords": [
        "api",
        "cryptomus",
        "asyncio",
        "crypto",
        "cryptomusapi"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "719b0f7be5696b85ed1c100c1c5d5f06c51d2715ccc15246d0c0f8c77e3fb657",
                "md5": "075d58c0bc461d9649bc351511e0a78d",
                "sha256": "611837c51fb3b42f8f36e844b58450be2a3ba9c595fbbc83b70231e3a7430ad5"
            },
            "downloads": -1,
            "filename": "CryptomusAPI-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "075d58c0bc461d9649bc351511e0a78d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8893,
            "upload_time": "2023-11-25T13:07:27",
            "upload_time_iso_8601": "2023-11-25T13:07:27.236854Z",
            "url": "https://files.pythonhosted.org/packages/71/9b/0f7be5696b85ed1c100c1c5d5f06c51d2715ccc15246d0c0f8c77e3fb657/CryptomusAPI-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-25 13:07:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Fsoky",
    "github_project": "CryptomusAPI",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "cryptomusapi"
}
        
Elapsed time: 0.13780s