Skip to main content

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

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

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())

Metadata

Release files for bauxite 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bauxite 1.0.2
File Size Uploaded
bauxite-1.0.2.tar.gz 10.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bauxite 1.0.2
File Interpreter ABI Platform
bauxite-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 23.6 kB

Release files / bauxite-1.0.2.tar.gz

Download URL bauxite-1.0.2.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ad0a71db39e43f1cc88c872fbc662fc84403bb00dc4598214f5e99123f56a37e
BLAKE2b-256 checksum
How to use checksums
eda4c877e53e316e87a28863f3c5fd7312614973eafac7f9b7ffbf78df1e3c3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.9.7 Linux/5.15.5-arch1-1

Release files / bauxite-1.0.2-py3-none-any.whl

Download URL bauxite-1.0.2-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f4369e564b4a7094163653bb96b48e7d6e8bf5848f9ff74291c9df472ebd5bb
BLAKE2b-256 checksum
How to use checksums
a3df62cec95e7e8f794707972a649171e4b948607ea23e73755037258a26a17b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.9.7 Linux/5.15.5-arch1-1

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page