A Bitcaster integration with Django
Project description
bitcaster-django
Bitcaster-django is a Django app for seamless integrating with Bitcaster system-to-user signal-to-message notification system.
Dependencies
- Python 3.8 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_APPSin yourconfig/settings.pyfile:INSTALLED_APPS = ( ... "bitcaster_django", ... )
-
Configure the app with the
BITCASTERdictionary in yourconfig/settings.pyfile:BITCASTER = { # Bitcaster Application Endpoint. # Falls back to the BITCASTER_BAE environment variable when empty/omitted. "BAE": "https://<token>@<host>/api/o/<organization>/", # forwarded to bitcaster_sdk.init() (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", }
The
bitcaster_sdkclient is initialized automatically at startup: nobitcaster_sdk.init()call is needed in your code. -
Check that your configuration is valid:
python manage.py check
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
All rights reserved.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bitcaster_django-0.4.1.tar.gz.
File metadata
- Download URL: bitcaster_django-0.4.1.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f5deddeb36f1295d267eca8751a97c7f54693932fd1d9b7ffd3493643911a10
|
|
| MD5 |
94e9c5b046c852f094a53b1f4f5caa98
|
|
| BLAKE2b-256 |
6f6e8fcb9e434512be57b09382545eaf273c799db1ed4a5b4b48a99f0ecffeda
|
Provenance
The following attestation bundles were made for bitcaster_django-0.4.1.tar.gz:
Publisher:
release.yml on k-tech-italy/bitcaster-django
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bitcaster_django-0.4.1.tar.gz -
Subject digest:
1f5deddeb36f1295d267eca8751a97c7f54693932fd1d9b7ffd3493643911a10 - Sigstore transparency entry: 2280180929
- Sigstore integration time:
-
Permalink:
k-tech-italy/bitcaster-django@8755797e0b52332cc92c6c48ea47ea7a7507686f -
Branch / Tag:
refs/tags/0.4.1 - Owner: https://github.com/k-tech-italy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8755797e0b52332cc92c6c48ea47ea7a7507686f -
Trigger Event:
release
-
Statement type:
File details
Details for the file bitcaster_django-0.4.1-py3-none-any.whl.
File metadata
- Download URL: bitcaster_django-0.4.1-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20d93a460a7b9dcce203a96ce3cfb3fae2b8b3b29a8ff0345bb8178c17c881f6
|
|
| MD5 |
227171737bfab40bc9c320549d946879
|
|
| BLAKE2b-256 |
44890b7629978819b7e33b35c0484f187ba9c6bf91321c7f95c1f2d46f361a5f
|
Provenance
The following attestation bundles were made for bitcaster_django-0.4.1-py3-none-any.whl:
Publisher:
release.yml on k-tech-italy/bitcaster-django
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bitcaster_django-0.4.1-py3-none-any.whl -
Subject digest:
20d93a460a7b9dcce203a96ce3cfb3fae2b8b3b29a8ff0345bb8178c17c881f6 - Sigstore transparency entry: 2280181000
- Sigstore integration time:
-
Permalink:
k-tech-italy/bitcaster-django@8755797e0b52332cc92c6c48ea47ea7a7507686f -
Branch / Tag:
refs/tags/0.4.1 - Owner: https://github.com/k-tech-italy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8755797e0b52332cc92c6c48ea47ea7a7507686f -
Trigger Event:
release
-
Statement type: