Skip to main content

Django utilities and common reusable components

Project description

sahim-django-common 📦

Django utilities and common components developed and maintained by SahimCo. This package is published publicly on PyPI for use in any Django project.

📥 Installation

Install from PyPI with pip:

pip install sahim-django-common

Or add to your project's dependencies (e.g. requirements.txt):

sahim-django-common

📋 Requirements

  • Python 3.10+
  • Django 5.0+

🚀 Usage

Add the app to your Django project's INSTALLED_APPS:

INSTALLED_APPS = [
    # ...
    "sahim_django_common",
    # ...
]

Or with the full app config:

INSTALLED_APPS = [
    # ...
    "sahim_django_common.apps.SahimDjangoCommonConfig",
    # ...
]

After installation, follow the documentation for the specific utilities you need. Usage details will depend on which modules you use.

(Documentation for individual utilities will be added here or in the docs as the package grows.)

📦 What's included

This package provides reusable Django utilities used across SahimCo projects, such as:

  • 🔧 Helper functions and decorators
  • ⚡ Optional management commands and app hooks

(This section can be updated as new utilities are added.)

📄 License

This project is licensed under the MIT License — see the LICENSE file for details.

🔧 Development

Setup

Install the package in editable mode with all dev and test dependencies:

pip install -r requirements-dev.txt

This installs the package (editable) plus pre-commit, pytest, and pytest-django.

Pre-commit

This project uses pre-commit for code quality checks:

# Install git hooks (run once)
pre-commit install

Hooks run automatically on commit. To run manually:

pre-commit run --all-files

Tests

Run tests with pytest:

pytest

📤 Publishing releases (PyPI)

Releases are published to PyPI automatically via GitHub Actions when you push a version tag.

One-time setup: Trusted Publishing on PyPI

  1. Log in to PyPI and open your project’s Publishing settings:
    • https://pypi.org/manage/project/sahim-django-common/settings/publishing/
  2. Add a Trusted Publisher with:
    • Owner: sahimco (or your GitHub org/user)
    • Repository name: sahim-django-common
    • Workflow name: release.yml
    • Environment name: pypi
  3. Create a pypi environment in GitHub: Repo → SettingsEnvironmentsNew environment → name it pypi (Optional: enable Required reviewers for extra safety.)

Releasing a new version

  1. Bump version in pyproject.toml.

  2. Commit and push:

    git add pyproject.toml
    git commit -m "Release v0.1.1"
    git tag v0.1.1
    git push origin main && git push origin v0.1.1
    
  3. The workflow runs automatically and publishes to PyPI.

🤝 Contributing

Contributions are welcome. Please open an issue or pull request on the GitHub repository.


SahimCoGitHub · PyPI

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

sahim_django_common-0.1.2.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

sahim_django_common-0.1.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file sahim_django_common-0.1.2.tar.gz.

File metadata

  • Download URL: sahim_django_common-0.1.2.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sahim_django_common-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0f29a25132f3e42c05fe18b51de5b68339ba1907653951ca64970576a2053726
MD5 062e73643c93007d222012120c787ede
BLAKE2b-256 7bbeda9c94dc91658901189489ff3d58d76b62ea7dc1a0f26628454c753031cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for sahim_django_common-0.1.2.tar.gz:

Publisher: release.yml on SahimCo/sahim-django-common

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sahim_django_common-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for sahim_django_common-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a169bfe85c264512d13db56e32605dbbd04fbe2f723f8e3ceac56635039aa855
MD5 d922cc809f65c188ecd2679d5cc5a677
BLAKE2b-256 991c84556ccca24aabde924ca04c1e155fe1a28292dca5e37c2da3f7f9b9a499

See more details on using hashes here.

Provenance

The following attestation bundles were made for sahim_django_common-0.1.2-py3-none-any.whl:

Publisher: release.yml on SahimCo/sahim-django-common

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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