bauxite-1.0.2
توضیحات
A robust, low-level connector for the Discord API
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | bauxite-1.0.2 |
| نام | bauxite |
| نسخه کتابخانه | 1.0.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | vcokltfre |
| ایمیل نویسنده | vcokltfre@gmail.com |
| آدرس صفحه اصلی | https://github.com/vcokltfre/bauxite |
| آدرس اینترنتی | https://pypi.org/project/bauxite/ |
| مجوز | MIT |
# Bauxite
Bauxite is a robust, low-level connector for the Discord API.
## What is Bauxite for?
Bauxite is made for two main purposes:
- Creating higher-level API wrappers and frameworks
- Creating things that need high levels of control and low-level access to the Discord API
## Examples
### Basic HTTP Example
```py
from asyncio import run
from bauxite import HTTPClient, Route
async def main() -> None:
client = HTTPClient("your_bot_token")
await client.request(
Route("POST", "/channels/{channel_id}/messages", channel_id=1234),
json={
"content": "Hello, world!",
},
)
await client.close()
run(main())
```
### Basic Gateway Example
```py
from asyncio import run
from bauxite import GatewayClient, HTTPClient
async def callback(shard, direction, data) -> None:
print(f"{shard} [{direction}]: {data['op'] or data['t']}")
async def main() -> None:
client = HTTPClient("your_bot_token")
gateway = GatewayClient(client, 32767, callbacks=[callback])
await gateway.spawn_shards()
run(main())
```
نیازمندی
| مقدار | نام |
|---|---|
| >=3.8.1,<4.0.0 | aiohttp |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.9,<4.0 | Python |
نحوه نصب
نصب پکیج whl bauxite-1.0.2:
pip install bauxite-1.0.2.whl
نصب پکیج tar.gz bauxite-1.0.2:
pip install bauxite-1.0.2.tar.gz