Skip to main content

bitcaster-django

Bitcaster-django is a Django app for seamless integration with Bitcaster, the system-to-user signal-to-message notification system.

Features

  • Zero-configuration setup — the bitcaster_sdk client is initialized automatically at startup from the BITCASTER settings dictionary (or the BITCASTER_BAE environment variable): no bitcaster_sdk.init() call needed.
  • Event triggering — a Client facade triggers remote Bitcaster events by local name, using the EventConfig model to map local event names to remote event slugs.
  • User synchronisation — Bitcaster users are kept aligned with your Django users automatically (creation and updates), with helper mixins for user management.
  • Runtime configuration — with the optional constance extra, any BITCASTER setting can be changed at runtime through django-constance; the sdk client is reinitialized automatically on changes.
  • System checks — the configuration is validated via Django's system check framework (python manage.py check).

Dependencies

  • Python 3.10 or later
  • Django 4.2 or later

Installation

  • Install bitcaster-django using your package manager of choice, e.g. Pip:

    pip install bitcaster-django
    # or, with django-constance support for runtime configuration:
    pip install bitcaster-django[constance]
    
  • Add bitcaster-django to INSTALLED_APPS in your config/settings.py file:

    INSTALLED_APPS = (
        ...
        "bitcaster_django",
        ...
    )
    
  • Configure the app with the BITCASTER dictionary in your config/settings.py file:

    BITCASTER = {
        # Bitcaster Application Endpoint.
        # Falls back to the BITCASTER_BAE environment variable when empty/omitted.
        "BAE": "https://<token>@<host>/api/o/<organization>/",
        # forwarded to the sdk client (optional, default: False)
        "DEBUG": False,
        # keep Bitcaster users aligned with Django users (optional, default: True)
        "SYNC_USERS": True,
        # project/application slugs used by Client.trigger_event() (optional)
        "PROJECT": "myprj",
        "APPLICATION": "myapp",
        # fully qualified name of the sdk client class to use
        # (optional, default: "bitcaster_sdk.client.Client")
        "CLIENT": "bitcaster_sdk.async_client.AsyncClient",
    }
    

    The bitcaster_sdk client is initialized automatically at startup: no bitcaster_sdk.init() call is needed in your code.

  • Check that your configuration is valid:

    python manage.py check
    

Triggering events

Map a local event name to a remote Bitcaster event slug with the EventConfig model (e.g. from the Django admin), then trigger the event by its local name through the Client facade:

from bitcaster_django.client import Client

Client().trigger_event("signup", context={"username": user.username})

See the documentation for details.

User synchronisation

When SYNC_USERS is enabled (the default), a post_save handler on your AUTH_USER_MODEL keeps Bitcaster users aligned with Django users:

  • creating a Django user creates the matching Bitcaster user;
  • updating a Django user updates it (creating it if missing).

Users without an email address are skipped, and any error while talking to Bitcaster is logged but never breaks the saving of the Django user.

Runtime configuration with django-constance (optional)

With the constance extra installed, any BITCASTER key can be overridden at runtime by declaring a BITCASTER_<KEY> entry in CONSTANCE_CONFIG:

INSTALLED_APPS = [
    ...
    "constance",
    "bitcaster_django",
]

CONSTANCE_CONFIG = {
    "BITCASTER_BAE": ("", "Bitcaster Application Endpoint"),
}

A non-empty constance value takes precedence over the BITCASTER dictionary, and the sdk client is reinitialized automatically whenever a BITCASTER_* constance key is updated.

Bug reports and requests for enhancements

Please open an issue on the project's issue tracker on GitHub.

Contributing to the project

See the contribution guide.

Licensing

Distributed under the KRM Source License, Version 1.1, Apache 2.0 Future License: see LICENSE.md.

Metadata

Release files for bitcaster-django 0.7

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

Source distribution (sdist)

Source distribution for bitcaster-django 0.7
File Size Uploaded
bitcaster_django-0.7.tar.gz 10.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bitcaster-django 0.7
File Interpreter ABI Platform
bitcaster_django-0.7-py3-none-any.whl Python 3 none any Details

Total release size: 24.3 kB

Release files / bitcaster_django-0.7.tar.gz

Download URL bitcaster_django-0.7.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d6833a92c715248d32aa613880fedb459120eb7643088989df1102d70072a78e
BLAKE2b-256 checksum
How to use checksums
dcbb6a7f8438fb4acbe225e72a599e59e3cb41c36ec70d5353e3f3b7b64f12a6
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 Aug 6, 2026.

Transparency log

Release files / bitcaster_django-0.7-py3-none-any.whl

Download URL bitcaster_django-0.7-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4849c941c5066a4e23ade47f94b76c1838437d653e0891145bfc3c6658c6a6a
BLAKE2b-256 checksum
How to use checksums
0423f608e45027cdd342c6ebdf36095967ccbe0c76f08c0961063b850426734b
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 Aug 6, 2026.

Transparency log

Release history Release notifications | RSS feed

0.7.5

2 release files

This release

0.7 This release

2 release files

0.5

2 release files

0.4.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