jinpy-utils
Status: dev (dev-releases). Latest version badges above are dynamic.
Minimal, type-safe utilities for Caching, Logging, Settings, and ORM. Built with modern Python practices (PEP 8, mypy, ruff) and high test coverage. This is an early release; APIs may evolve.
📚 Docs: See the documentation in docs/ (start with overview.md).
Features
- 🚀 Caching: Advanced caching utilities with multiple backends
- 📝 Logging: Structured logging with configurable console/file/REST/WebSocket backends
- ⚙️ Settings: Configuration management with environment variable support
- 🗄️ ORM: Database operations and migrations with SQLModel integration
- ✅ Type Safe: Full type hints and mypy compatibility
- 🧪 Well Tested: Comprehensive test coverage with pytest
- 🔧 Developer Friendly: Pre-commit hooks and code quality tools
Requirements
- Python: 3.12 or higher
- Package Manager: uv (recommended)
Installation
Using uv (Recommended)
uv add jinpy-utils
Using pip
pip install jinpy-utils
Quick Start (Logging)
from jinpy_utils.logger.config import GlobalLoggerConfig, ConsoleBackendConfig
from jinpy_utils.logger.core import Logger
# 1) Configure once (12-factor friendly; env helpers available)
cfg = GlobalLoggerConfig(backends=[ConsoleBackendConfig(name="console")])
Logger.set_global_config(cfg)
# 2) Get a logger and log
log = Logger.get_logger("app")
log.info("hello", {"env": "dev"})
Core Dependencies
This library is built on top of these excellent packages:
- Pydantic (v2+): Data validation and settings management
- SQLModel (v0.0.24+): SQL databases with Python type hints
- Structlog (v24+): Structured logging
- Cachetools (v5+): Caching utilities
- Alembic (v1.13+): Database migrations
- Python-dotenv (v1+): Environment variables
Development
Prerequisites
- Python 3.12+
- uv package manager
Setup Development Environment
-
Clone the repository
git clone <repository-url> cd jinpy-utils
-
Install dependencies
uv sync --all-extras
-
Install pre-commit hooks
uv run pre-commit install
Commands
- Format code:
uv run ruff format . - Lint and fix issues:
uv run ruff check --fix . - Type checking:
uv run mypy . - Run tests:
uv run pytest - Run tests with coverage:
uv run pytest - Security scanning:
uv run bandit -r jinpy_utils - Run all pre-commit hooks:
uv run pre-commit run --all-files
Code Quality
This project maintains high code quality standards:
- Code Formatting: Black
- Linting: Ruff
- Type Checking: MyPy with strict configuration
- Security: Bandit for security issue detection
- Testing: Pytest with coverage reporting
- Pre-commit Hooks: Automated quality checks before commits
Project Structure (partial)
jinpy-utils/
├── src/
│ └── jinpy_utils/ # Main package directory
│ ├── __init__.py
│ └── py.typed # Type information marker
├── tests/ # Test suite
├── docs/ # Documentation (coming soon)
├── pyproject.toml # Project configuration
├── README.md # This file
└── .pre-commit-config.yaml # Pre-commit configuration
Contributing
We welcome contributions! Please see our CONTRIBUTING.md for details on:
- Code style and standards
- Testing requirements
- Pull request process
- Issue reporting
Development Workflow
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests and quality checks
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Roadmap (high-level)
- Core caching implementations
- Structured logging utilities
- Settings management system
- ORM helpers and utilities
- Comprehensive documentation
- Performance benchmarks
- Plugin system
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Jinto A G
- Email: project.jintoag@gmail.com
- GitHub: jintoag
Support
If you encounter any issues or have questions:
- Check the issues page
- Create a new issue with detailed information
- Contact the maintainer via email
Made with ❤️ and Python
Metadata
Release files for jinpy-utils 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jinpy_utils-0.2.0.tar.gz | 39.8 kB | Without provenance | Details for jinpy_utils-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jinpy_utils-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for jinpy_utils-0.2.0-py3-none-any.whl |
Total release size: 84.8 kB
Release files / jinpy_utils-0.2.0.tar.gz
| Download URL | jinpy_utils-0.2.0.tar.gz |
|---|---|
| Size | 39.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3239fd57defb8573a51e9dd3184e9bbd5c4606acff843b56591795cf60229613
|
|
BLAKE2b-256 checksum How to use checksums |
2cc9837a274003e39a3b85ad3723f74097c34c512354042ad6c4b22ad3af24f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.11
|
Release files / jinpy_utils-0.2.0-py3-none-any.whl
| Download URL | jinpy_utils-0.2.0-py3-none-any.whl |
|---|---|
| Size | 45.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04beb623f6ad7e9ddf20315cf5684b704704e26db3a912c1f193c977e9bf90ab
|
|
BLAKE2b-256 checksum How to use checksums |
512cee829fbd32cb6ef84502ed05b27a2f6fbd49a4a81ba6e033be90105f9701
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.11
|
Security for jinpy-utils 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.