Metadata-Version: 2.4
Name: sahim-django-common
Version: 0.1.0
Summary: Django utilities and common reusable components
Author-email: SahimCo <sahimco.develop@gmail.com>
License: MIT License
        
        Copyright (c) 2026 SahimCo
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/sahimco/sahim-django-common
Project-URL: Documentation, https://github.com/sahimco/sahim-django-common#readme
Project-URL: Repository, https://github.com/sahimco/sahim-django-common
Project-URL: Bug Tracker, https://github.com/sahimco/sahim-django-common/issues
Keywords: django,utilities,common,reusable,sahimco
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.0
Classifier: Framework :: Django :: 5.1
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Django<6.0,>=5.0
Provides-Extra: dev
Requires-Dist: pre-commit>=4.0; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-django; extra == "test"
Dynamic: license-file

# sahim-django-common 📦

**Django utilities and common components** developed and maintained by [SahimCo](https://github.com/sahimco). This package is published publicly on [PyPI](https://pypi.org/project/sahim-django-common/) for use in any Django project.

## 📥 Installation

Install from PyPI with pip:

```bash
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`:

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

Or with the full app config:

```python
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](LICENSE) file for details.

## 🔧 Development

### Setup

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

```bash
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](https://pre-commit.com/) for code quality checks:

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

Hooks run automatically on commit. To run manually:

```bash
pre-commit run --all-files
```

### Tests

Run tests with pytest:

```bash
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](https://pypi.org) and open your project’s **Publishing** settings:
   - `https://pypi.org/manage/project/sahim-django-common/settings/publishing/`
1. Add a **Trusted Publisher** with:
   - **Owner:** `sahimco` (or your GitHub org/user)
   - **Repository name:** `sahim-django-common`
   - **Workflow name:** `release.yml`
   - **Environment name:** `pypi`
1. Create a `pypi` environment in GitHub:
   Repo → **Settings** → **Environments** → **New environment** → name it `pypi`
   (Optional: enable **Required reviewers** for extra safety.)

### Releasing a new version

1. Bump version in `pyproject.toml`.

1. Commit and push:

   ```bash
   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
   ```

1. The workflow runs automatically and publishes to PyPI.

## 🤝 Contributing

Contributions are welcome. Please open an issue or pull request on the [GitHub repository](https://github.com/sahimco/sahim-django-common).

______________________________________________________________________

**SahimCo** — [GitHub](https://github.com/sahimco) · [PyPI](https://pypi.org/project/sahim-django-common/)
