Official wrapper for the AenoX API
Project description
AenoX API
⚙️ 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 to your discord server and simply run /api
.
Example
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:
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:
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!')
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
aenox-0.0.8.tar.gz
(5.2 kB
view details)
Built Distribution
aenox-0.0.8-py3-none-any.whl
(5.8 kB
view details)
File details
Details for the file aenox-0.0.8.tar.gz
.
File metadata
- Download URL: aenox-0.0.8.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9add17c5f3091818aaab65c87a4ff7875d16df7b4cbf68fce010fd31e76f9197 |
|
MD5 | 78d587742d39569d5b4fddc159a2d7f3 |
|
BLAKE2b-256 | f8e0872d7f40ba15b88a643f8e8eaa17eeab07e142e8a99ef7a783d01b2d25a1 |
File details
Details for the file aenox-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: aenox-0.0.8-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdf584098c60f6fff59411219e2a849b792f4ceb981adf18198cf0540db63b6f |
|
MD5 | 78cb8c3e71b2ce1a7d7426031892801e |
|
BLAKE2b-256 | 26694c4e3481c38b60a25fdf9aeea4e65a773c6aedae65b9cf16a513283e6c2a |