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
- Log in to PyPI and open your project’s Publishing settings:
https://pypi.org/manage/project/sahim-django-common/settings/publishing/
- Add a Trusted Publisher with:
- Owner:
sahimco(or your GitHub org/user) - Repository name:
sahim-django-common - Workflow name:
release.yml - Environment name:
pypi
- Owner:
- Create a
pypienvironment in GitHub: Repo → Settings → Environments → New environment → name itpypi(Optional: enable Required reviewers for extra safety.)
Releasing a new version
-
Bump version in
pyproject.toml. -
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
-
The workflow runs automatically and publishes to PyPI.
🤝 Contributing
Contributions are welcome. Please open an issue or pull request on the GitHub repository.
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f29a25132f3e42c05fe18b51de5b68339ba1907653951ca64970576a2053726
|
|
| MD5 |
062e73643c93007d222012120c787ede
|
|
| BLAKE2b-256 |
7bbeda9c94dc91658901189489ff3d58d76b62ea7dc1a0f26628454c753031cc
|
Provenance
The following attestation bundles were made for sahim_django_common-0.1.2.tar.gz:
Publisher:
release.yml on SahimCo/sahim-django-common
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sahim_django_common-0.1.2.tar.gz -
Subject digest:
0f29a25132f3e42c05fe18b51de5b68339ba1907653951ca64970576a2053726 - Sigstore transparency entry: 969322937
- Sigstore integration time:
-
Permalink:
SahimCo/sahim-django-common@21d1b28058fa6cb33fe65627d60c31c6484cb264 -
Branch / Tag:
refs/tags/v.0.1.2 - Owner: https://github.com/SahimCo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@21d1b28058fa6cb33fe65627d60c31c6484cb264 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sahim_django_common-0.1.2-py3-none-any.whl.
File metadata
- Download URL: sahim_django_common-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a169bfe85c264512d13db56e32605dbbd04fbe2f723f8e3ceac56635039aa855
|
|
| MD5 |
d922cc809f65c188ecd2679d5cc5a677
|
|
| BLAKE2b-256 |
991c84556ccca24aabde924ca04c1e155fe1a28292dca5e37c2da3f7f9b9a499
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sahim_django_common-0.1.2-py3-none-any.whl -
Subject digest:
a169bfe85c264512d13db56e32605dbbd04fbe2f723f8e3ceac56635039aa855 - Sigstore transparency entry: 969322940
- Sigstore integration time:
-
Permalink:
SahimCo/sahim-django-common@21d1b28058fa6cb33fe65627d60c31c6484cb264 -
Branch / Tag:
refs/tags/v.0.1.2 - Owner: https://github.com/SahimCo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@21d1b28058fa6cb33fe65627d60c31c6484cb264 -
Trigger Event:
push
-
Statement type: