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.0.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.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sahim_django_common-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 6fd5a4e0b5c16b65189627824a2444707222414928eb953c2007b8e9cb191ef5
MD5 fe95c7893131b17123dd5a0ea3b37d19
BLAKE2b-256 dd7859737490ca867d7a0bee436a3664edec3a2c503b1764ad54525103b341a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for sahim_django_common-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sahim_django_common-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e1e55b574974978a401a6dad44c97cd8ad13f977ba4816ef365385dce25ff88
MD5 c786700e009878e4ebbf24ce7d21f519
BLAKE2b-256 330b13fee8a0b6eb8d0c4509d737b6a4f300aa724f6311e50df64265cf524022

See more details on using hashes here.

Provenance

The following attestation bundles were made for sahim_django_common-0.1.0-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