osmium-chat
A Python API wrapper for Osmium.
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, orCOMMUNITY_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.
Links
Metadata
Release files for osmium-chat 0.3.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| osmium_chat-0.3.7.tar.gz | 94.9 kB | With provenance | Details for osmium_chat-0.3.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| osmium_chat-0.3.7-py3-none-any.whl | Python 3 | none | any | Details for osmium_chat-0.3.7-py3-none-any.whl |
Total release size: 157.9 kB
Release files / osmium_chat-0.3.7.tar.gz
| Download URL | osmium_chat-0.3.7.tar.gz |
|---|---|
| Size | 94.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f9b695ed1d5e388e50d23be26451b0b663c3d8087fb60bcbb32538ba0b7b6da
|
|
BLAKE2b-256 checksum How to use checksums |
887de8817435867426c8e1029462e9de6ed3982d217c8fa339448b73b804d866
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 19, 2026.
Transparency logRelease files / osmium_chat-0.3.7-py3-none-any.whl
| Download URL | osmium_chat-0.3.7-py3-none-any.whl |
|---|---|
| Size | 63.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a357fc2a7c5f2cd6bc5c3984b83d36e73465ed7ce7fce79e66c4cd4c0ad930d8
|
|
BLAKE2b-256 checksum How to use checksums |
be75a784b37134a7dd4f628df5d12984b67a2a7ee83e1218537f9b07dae5c274
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 19, 2026.
Transparency logSecurity for osmium-chat 0.3.7
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for osmium_chat-0.3.7.tar.gz
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 Oct 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.