Skip to main content

Reusable Django app to track release versions and notify users when a new version is published.

Project description

django-i3version

Reusable Django app to track release versions / changelogs of an application, notify users when a new version is published, and (in a future version) accept release publications via API key.

pip install django-i3version

Quick start

1. Install + add to INSTALLED_APPS

INSTALLED_APPS = [
    ...,
    "simple_history",      # required dependency, used for history tracking
    "django_i3version",
]

Note on app label. The package module is django_i3version but the Django app label is intentionally set to i3version, so DB tables stay as i3version_*. This makes it possible to drop in this package as a replacement for a project that previously had a local i3version/ Django app — no DB rename, no --fake-initial, no FK-string rewrite.

2. Include URLs (optional)

# urls.py
from django.urls import path, include

urlpatterns = [
    ...,
    path("api/i3version/", include("django_i3version.urls")),
]

This exposes UserVersionViewSet (read-only list / retrieve / mark-as-read) filtered to the authenticated user's notifications and the project's TIER setting (if any).

3. Run migrations

python manage.py migrate i3version

Models

  • Version — a release row. Fields: numeric_version, str_version, uuid_version, name, tier (local/stage/prod), short_description, description, markdown, microservice_commits (JSON), and the user-group filters user_group_filter / user_group_exclude used at creation time to fan out VersionUserNotified rows.
  • VersionAttachment — files attached to a version.
  • VersionUserNotified — per-user notification record (is_notified, is_read). Created automatically on Version.save() for every user matching the version's filter. Marked read via the API.

Settings

Setting Type Default Effect
TIER str None If set, the user-version viewset filters only versions of this tier.

Views

  • GET /<your-prefix>/ — paginated list of versions visible to the user
  • GET /<your-prefix>/{id}/ — single version
  • POST /<your-prefix>/{id}/mark_as_read/ — mark this version as read
  • POST /<your-prefix>/mark_all_as_read/ — mark all versions as read

Roadmap

  • API-key publish endpoint (issue release rows from CI / external systems) via a VersionPublisher model with hashed key.
  • Webhooks on new release.
  • Pluggable notification backends (Slack, email, Pub/Sub).

Development

make virtualenv_create
source venv/bin/activate
make install_dev
make test           # runs unit tests against in-memory sqlite
make package_build  # build sdist + wheel
make package_upload # twine upload

License: GNU GPL v3.0.
Repo: https://github.com/sajlx/django-i3version

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_i3version-0.0.1.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_i3version-0.0.1-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file django_i3version-0.0.1.tar.gz.

File metadata

  • Download URL: django_i3version-0.0.1.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for django_i3version-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f2aa6bea33fb9a6592836a6d894002227e97b34a9e45a0d5d068ea8958c9ef06
MD5 3a264839427fe50184679f9b1ccb98b8
BLAKE2b-256 c2e4b395dbee8a83731892712036c2b33518838850d8d82d85fc583b156c17a8

See more details on using hashes here.

File details

Details for the file django_i3version-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_i3version-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4eaa962190d8f959f224f2d1f61419be02a09d07b51c805107b8bba6f7f78362
MD5 d2dc948a5774080f9f756ddfb1e9f4ad
BLAKE2b-256 ee125e2247e9bd35af26039bf504654d50eeecf5bd1c0af5a4b3156a6ed5506b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page