Small utility package for my projects.
Project description
Pedros
A small package of reusable Python utilities for Python projects.
Features
- Dependency Management: Smart detection of optional dependencies (rich, tqdm)
- Logging: Simplified logging setup with optional Rich support
- Progress Bars: Unified progress bar API with multiple backends
- Decorators: Robust decorators for timing (
@timed) and error handling (@safe) - Type Safe: Comprehensive type hints and PEP 561 compliance
Installation
pip install pedros
OR
uv add pedros
Quickstart
from pedros import setup_logging, get_logger, progbar, timed, safe
# Configure logging
setup_logging()
logger = get_logger()
# Use progress bar (auto-selects backend: rich > tqdm > basic)
for item in progbar(range(10), desc="Processing"):
pass
# Time function execution
@timed
def process_data():
return "result"
process_data() # Logs: "process_data took 1.23 ms to execute."
# Safely handle errors
@safe(re_raise=False)
def risky_operation():
raise ValueError("Something went wrong")
risky_operation() # Logs the error but doesn't crash
License
This project is licensed under the MIT License.
Contributing
Contributions are welcome! Please open issues or pull requests on GitHub.
Support
For questions or support, please open a GitHub issue.
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 pedros-0.12.1.tar.gz.
File metadata
- Download URL: pedros-0.12.1.tar.gz
- Upload date:
- Size: 51.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fc6f3e1dfe694aac83b5db70138d1a49b6266a671fb4c88c27102a0d0db4b55
|
|
| MD5 |
bd007838f49db1ddee963b32a5c76822
|
|
| BLAKE2b-256 |
6aa094125c8627cc8956a1f3a16b5c6c664e714bca299bea88fe81da2b0dad7d
|
Provenance
The following attestation bundles were made for pedros-0.12.1.tar.gz:
Publisher:
python-publish.yml on PierreLapolla/pedros
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pedros-0.12.1.tar.gz -
Subject digest:
3fc6f3e1dfe694aac83b5db70138d1a49b6266a671fb4c88c27102a0d0db4b55 - Sigstore transparency entry: 814695589
- Sigstore integration time:
-
Permalink:
PierreLapolla/pedros@00aeb50742d998be9de963572551b74b85084e67 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/PierreLapolla
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@00aeb50742d998be9de963572551b74b85084e67 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pedros-0.12.1-py3-none-any.whl.
File metadata
- Download URL: pedros-0.12.1-py3-none-any.whl
- Upload date:
- Size: 10.5 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 |
e947770661849e580dee3ead24ca1ab5f6ade076bbf9eefd794714e02f6191b2
|
|
| MD5 |
edf7b31124ce7fb4ac44ab1e031d510d
|
|
| BLAKE2b-256 |
cb75ba61ca29725d7d7437660b978ded364ee1d107bf0ad6241dfa8cffd51bfe
|
Provenance
The following attestation bundles were made for pedros-0.12.1-py3-none-any.whl:
Publisher:
python-publish.yml on PierreLapolla/pedros
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pedros-0.12.1-py3-none-any.whl -
Subject digest:
e947770661849e580dee3ead24ca1ab5f6ade076bbf9eefd794714e02f6191b2 - Sigstore transparency entry: 814695592
- Sigstore integration time:
-
Permalink:
PierreLapolla/pedros@00aeb50742d998be9de963572551b74b85084e67 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/PierreLapolla
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@00aeb50742d998be9de963572551b74b85084e67 -
Trigger Event:
push
-
Statement type: