Skip to main content

osmium-chat

A Python API wrapper for Osmium.

enbyware


Installation

pip install osmium-chat

Requires Python 3.13+.


Quick start

from osmium_chat import Bot, Context
from osmium_chat.commands import CommandRestriction

bot = Bot(prefix="!", client_id=YOUR_CLIENT_ID)


@bot.on("connect")
async def on_connect() -> None:
    print("Connected!")


@bot.command("ping")
async def ping(ctx: Context) -> None:
    await ctx.channel.send("Pong!")


@bot.command("say", restriction=CommandRestriction.COMMUNITY_ONLY)
async def say(ctx: Context, *, words: str) -> None:
    await ctx.channel.send(words)


bot.run(token="YOUR_TOKEN")

Rich text formatting

from osmium_chat.content import Bold, CodeBlock, Content, Italic, Spoiler, TextUrl

await ctx.channel.send(Content(
    f"Hello, {Bold('world')}! ",
    TextUrl("osmium.chat", url="https://osmium.chat"),
))

Features

  • Commands — prefix-based command routing with automatic argument parsing and type conversion
  • Command restrictions — CommandRestriction.NONE (default), DM_ONLY, or COMMUNITY_ONLY
  • Rich text — Bold, Italic, Underline, Code, CodeBlock, Spoiler, TextUrl, and more
  • Communities — create/manage channels, categories, and roles
  • Invites — create, list, look up, and revoke invite links
  • File attachments — upload files from bytes, download and save attachments to disk
  • Events — connect, message, guild_message, dm_message, command_error

Documentation

Full API reference: osmium-chat.readthedocs.io

More examples in the examples/ directory.


Metadata

Release files for osmium-chat 0.3.6

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

Source distribution (sdist)

Source distribution for osmium-chat 0.3.6
File Size Uploaded
osmium_chat-0.3.6.tar.gz 40.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for osmium-chat 0.3.6
File Interpreter ABI Platform
osmium_chat-0.3.6-py3-none-any.whl Python 3 none any Details

Total release size: 92.3 kB

Release files / osmium_chat-0.3.6.tar.gz

Download URL osmium_chat-0.3.6.tar.gz
Size 40.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0314eab30015b55b90a7d9c99ef4bd248d56164cd22ec37fe69583a1a17737cf
BLAKE2b-256 checksum
How to use checksums
49d53bf8bb1e07a4caf6cf1ee6477c927f3464ba1972f5e06bfa87e7942cc1a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 15, 2026.

Transparency log

Release files / osmium_chat-0.3.6-py3-none-any.whl

Download URL osmium_chat-0.3.6-py3-none-any.whl
Size 52.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
926ed36efbf1463415b9743134e7b9be7b78a579ec88598c48327af5d672bd56
BLAKE2b-256 checksum
How to use checksums
56fae061624cb015e74218a5c82d8f98ec4303115b3ec48a01c8d072661230a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.6 This release

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

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