aenox


Nameaenox JSON
Version 0.0.8 PyPI version JSON
download
home_pageNone
SummaryOfficial wrapper for the AenoX API
upload_time2024-09-02 14:43:19
maintainerNone
docs_urlNone
authoraenoxic
requires_python>=3.10
licenseMIT
keywords aenox discord bot api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AenoX API
[![](https://img.shields.io/pypi/v/aenox.svg?style=for-the-badge&logo=pypi&color=yellow&logoColor=white)](https://pypi.org/project/aenox/)
[![](https://img.shields.io/pypi/l/aenox?style=for-the-badge&color=5865F2)](https://github.com/aenoxic/aenox-api/blob/main/LICENSE)
[![](https://img.shields.io/readthedocs/aenox-api?style=for-the-badge)](https://aenox-api.readthedocs.io/en/latest/)

## ⚙️ Installation
Python 3.10 or higher is required
```
pip install aenox
```

## 🚀 Example Usage
To be able to perform your API query properly, replace `[YOUR_API_KEY]` with a valid API key.

To get an API Key, [invite the bot](https://discord.com/oauth2/authorize?client_id=1278294334177022033) to your discord server and simply run `/api`.

### Example

```python
from aenox import AenoXAPI

api = AenoXAPI(api_key="[YOUR_API_KEY]")

print(api.test())  # Returns "Success!" if it is installed correctly
```


## 🫧 Cooldown
You can send 20 queries per second to the API. If you attempt to send another request before this cooldown has passed, you will receive a `aenox.errors.CooldownError`.

### Example
You cannot run this query twice within 2 seconds:
```python
from aenox import AenoXAPI

api = AenoXAPI(api_key="[YOUR_API_KEY]")

api.get_user_stats(user_id=123)
```

In such cases, use `try/except` to handle the error. For example:

```python
from aenox import CooldownError
from aenox import AenoXAPI

api = AenoXAPI(api_key="[YOUR_API_KEY]")

try:
    api.get_user_stats(user_id=123)
except CooldownError:
    print('Cooldown!')
```


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "aenox",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "aenox, discord, bot, api",
    "author": "aenoxic",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/f8/e0/872d7f40ba15b88a643f8e8eaa17eeab07e142e8a99ef7a783d01b2d25a1/aenox-0.0.8.tar.gz",
    "platform": null,
    "description": "# AenoX API\r\n[![](https://img.shields.io/pypi/v/aenox.svg?style=for-the-badge&logo=pypi&color=yellow&logoColor=white)](https://pypi.org/project/aenox/)\r\n[![](https://img.shields.io/pypi/l/aenox?style=for-the-badge&color=5865F2)](https://github.com/aenoxic/aenox-api/blob/main/LICENSE)\r\n[![](https://img.shields.io/readthedocs/aenox-api?style=for-the-badge)](https://aenox-api.readthedocs.io/en/latest/)\r\n\r\n## \u2699\ufe0f Installation\r\nPython 3.10 or higher is required\r\n```\r\npip install aenox\r\n```\r\n\r\n## \ud83d\ude80 Example Usage\r\nTo be able to perform your API query properly, replace `[YOUR_API_KEY]` with a valid API key.\r\n\r\nTo get an API Key, [invite the bot](https://discord.com/oauth2/authorize?client_id=1278294334177022033) to your discord server and simply run `/api`.\r\n\r\n### Example\r\n\r\n```python\r\nfrom aenox import AenoXAPI\r\n\r\napi = AenoXAPI(api_key=\"[YOUR_API_KEY]\")\r\n\r\nprint(api.test())  # Returns \"Success!\" if it is installed correctly\r\n```\r\n\r\n\r\n## \ud83e\udee7 Cooldown\r\nYou can send 20 queries per second to the API. If you attempt to send another request before this cooldown has passed, you will receive a `aenox.errors.CooldownError`.\r\n\r\n### Example\r\nYou cannot run this query twice within 2 seconds:\r\n```python\r\nfrom aenox import AenoXAPI\r\n\r\napi = AenoXAPI(api_key=\"[YOUR_API_KEY]\")\r\n\r\napi.get_user_stats(user_id=123)\r\n```\r\n\r\nIn such cases, use `try/except` to handle the error. For example:\r\n\r\n```python\r\nfrom aenox import CooldownError\r\nfrom aenox import AenoXAPI\r\n\r\napi = AenoXAPI(api_key=\"[YOUR_API_KEY]\")\r\n\r\ntry:\r\n    api.get_user_stats(user_id=123)\r\nexcept CooldownError:\r\n    print('Cooldown!')\r\n```\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Official wrapper for the AenoX API",
    "version": "0.0.8",
    "project_urls": null,
    "split_keywords": [
        "aenox",
        " discord",
        " bot",
        " api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "26694c4e3481c38b60a25fdf9aeea4e65a773c6aedae65b9cf16a513283e6c2a",
                "md5": "78cb8c3e71b2ce1a7d7426031892801e",
                "sha256": "fdf584098c60f6fff59411219e2a849b792f4ceb981adf18198cf0540db63b6f"
            },
            "downloads": -1,
            "filename": "aenox-0.0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "78cb8c3e71b2ce1a7d7426031892801e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 5775,
            "upload_time": "2024-09-02T14:43:16",
            "upload_time_iso_8601": "2024-09-02T14:43:16.877724Z",
            "url": "https://files.pythonhosted.org/packages/26/69/4c4e3481c38b60a25fdf9aeea4e65a773c6aedae65b9cf16a513283e6c2a/aenox-0.0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f8e0872d7f40ba15b88a643f8e8eaa17eeab07e142e8a99ef7a783d01b2d25a1",
                "md5": "78d587742d39569d5b4fddc159a2d7f3",
                "sha256": "9add17c5f3091818aaab65c87a4ff7875d16df7b4cbf68fce010fd31e76f9197"
            },
            "downloads": -1,
            "filename": "aenox-0.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "78d587742d39569d5b4fddc159a2d7f3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 5204,
            "upload_time": "2024-09-02T14:43:19",
            "upload_time_iso_8601": "2024-09-02T14:43:19.262039Z",
            "url": "https://files.pythonhosted.org/packages/f8/e0/872d7f40ba15b88a643f8e8eaa17eeab07e142e8a99ef7a783d01b2d25a1/aenox-0.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-02 14:43:19",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "aenox"
}
        
Elapsed time: 0.75063s