Skip to main content

Project Logo

The Lupaxa Notifications Toolbox
Part of The Lupaxa Project


lupaxa-discordit

Send Discord messages through an incoming webhook.

Features

  • Post message text, one embed, or one file
  • Set a username and avatar URL on each client
  • Keep several webhook profiles in $HOME/.discordit.yml and select one with --profile
  • Override any profile field with a CLI flag
  • Enable text-to-speech, a forum thread name, and allowed mentions
  • Turn escaped \n sequences in message text into real line breaks
  • Reject webhook URLs that do not use Discord's /api/webhooks/ path
  • Reject webhook URLs that answer GET with a redirect
  • Use the Discordit library class or the discordit command

Installation

From PyPI

pip install lupaxa-discordit

From source (development mode)

pip install -e ".[dev]"

Requires Python 3.13+. Runtime dependencies: requests and PyYAML.

Library quick start

from lupaxa.discordit import Discordit, load_profile

profile = load_profile("testing")
client = Discordit(
    profile.webhook_url,
    username=profile.username,
    avatar_url=profile.avatar_url,
)
client.send_message("Hello")

CLI quick start

discordit --help
discordit --webhook "$DISCORD_WEBHOOK_URL" --text "Hello"
discordit --profile testing --text "Hello"
discordit -p alerts --config "$HOME/work/discordit.yml" --text "Disk full"
python -m lupaxa.discordit --version

The webhook URL must use Discord's /api/webhooks/ path. --text, --embed, and --file may be combined. --validate cannot be combined with them. One of those four is required. Flags override the same fields from the selected profile.

You can also run the CLI as a module:

python -m lupaxa.discordit --help
python -m lupaxa.discordit --version

Config

Profiles live in one YAML file. The default path is $HOME/.discordit.yml. Pass --config when the file lives somewhere else. --config requires --profile. CLI flags override the selected profile.

profiles:
  testing:
    webhook_url: https://discord.com/api/webhooks/WEBHOOK_ID/WEBHOOK_TOKEN
    username: PyBot
    avatar_url: https://example.com/avatar.png
    tts: false
    thread_name: Alerts
    allowed_mentions:
      parse: []
    timeout: 15

Each profile may set webhook_url, username, avatar_url, tts, thread_name, allowed_mentions, and timeout. --webhook is required when you do not pass --profile.

Development

Clone the repository and install with Make:

make init                # first-time makefile-skills checkout
make python-install-dev  # editable install with [dev]
make python-check        # lint, type-check, and test
The Lupaxa Project Footer

Release files for lupaxa-discordit 0.1.0

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

Source distribution (sdist)

Source distribution for lupaxa-discordit 0.1.0
File Size Uploaded
lupaxa_discordit-0.1.0.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lupaxa-discordit 0.1.0
File Interpreter ABI Platform
lupaxa_discordit-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.2 kB

Release files / lupaxa_discordit-0.1.0.tar.gz

Download URL lupaxa_discordit-0.1.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
11a7b861e17d22e0d3ac62be7c53799a7e001e45d78a935f07201569b71cf0c4
BLAKE2b-256 checksum
How to use checksums
9e7ee406858b3a26616919c71cdeb0f5e17b7a53a8b592f7e0d5a664a02c7dda
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 Sep 22, 2026.

Transparency log

Release files / lupaxa_discordit-0.1.0-py3-none-any.whl

Download URL lupaxa_discordit-0.1.0-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
595c944594c6e83357a67940719c7abfaf5b144cd9ac5bf212b9eca84c87c1a4
BLAKE2b-256 checksum
How to use checksums
be5cc63d22d0e68d68784ed3770f1ce7095c3052fc31f4677d15d1476452a0dd
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 Sep 22, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

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