Factory-based logging decorators and batch ETL utilities
Project description
python_devops
This repository is intended to be a DevOps toolkit workspace.
It contains practical, reusable projects and utilities that support common engineering and operations workflows, such as automation, observability, reliability, and deployment-related tasks.
Root-level deployment workflow
You can now deploy/build python-devops-logging-decorators directly from the python_devops root.
1) Create virtual environment (once)
py -m venv .venv
2) Install dependencies from root requirements
- Runtime only:
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
- Development profile:
.\.venv\Scripts\python.exe -m pip install -r requirements-dev.txt
- Docs profile:
.\.venv\Scripts\python.exe -m pip install -r requirements-docs.txt
3) Run deployment/build from root
- PowerShell:
.\deploy.ps1 -Profile dev
- Bash:
./deploy.sh dev
Valid profiles are runtime, dev, and docs.
Build artifacts are written to dist/.
PyPI deployment config (Bitbucket)
A top-level TOML config now exists at pyproject.toml with deployment metadata for publishing the root distribution to PyPI from Bitbucket pipelines.
Published distribution name:
python-devops-logging-decorators
Import instructions
Install from PyPI:
pip install python-devops-logging-decorators
Or install locally from this repository root (editable):
pip install -e .
Then import both subprojects as:
import logging_decorators
import batch_etl
Install command:
pip install python-devops-logging-decorators
After install, you can import both packages:
import logging_decorators
import batch_etl
It includes:
- project/dist paths
- requirements profiles
- PyPI and TestPyPI upload URLs
- expected Bitbucket env var names for secrets
- canonical install/build/check/upload command strings
Set these repository variables in Bitbucket before publishing:
PYPI_TOKENTEST_PYPI_TOKEN(optional; falls back toPYPI_TOKENfor TestPyPI)
Recommended pipeline flow:
- install dependencies
- build package
- run twine check
- upload to TestPyPI
- upload to PyPI (on release/tag)
Bitbucket pipeline file
Top-level pipeline config: bitbucket-pipelines.yml
- pushes to
mainrun publish to TestPyPI - tags matching
v*run publish to PyPI
The pipeline reads [tool.python_devops.pypi.commands] from the root pyproject.toml, so deployment commands stay centralized in one file.
Component projects
logging_decorators
logging_decorators is a component library that provides Python decorators for standardized function logging.
It uses a factory pattern to create decorators by:
- log level (
debug,info,warning,error,critical) - handler type (
stream,file,rotating_file,timed_rotating_file) - level + handler combinations (for example
error_file,info_rotating_file)
It also supports optional formatter overrides and includes examples/tests so it can be adopted quickly in application or automation code.
batch_etl
batch_etl is a DAG-oriented ETL component library included in the same published distribution.
It provides:
- abstract ETL primitives (
BaseExtractor,BaseTransformer,BaseLoader) - a pipeline orchestrator (
Pipeline) with dependency traversal and cycle detection - concrete CSV implementations (
CsvFileExtractor,PassthroughRowsTransformer,CsvFileLoader) - demo utilities for OHLC CSV workflows (
batch_etl.demo)
For detailed usage examples, see batch_etl/README.md.
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 python_devops_logging_decorators-0.1.4.tar.gz.
File metadata
- Download URL: python_devops_logging_decorators-0.1.4.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f2bc2fdb1f69a6320b2339edb151c055bc63d17558b6e5ed8800e6b10d05d5d
|
|
| MD5 |
5cedec04bfde27efcd07495c9e865b97
|
|
| BLAKE2b-256 |
ff23ea4f4216ed1116e49b5a3fea52e11f5169cf2ce17cf1c513341461d784fa
|
File details
Details for the file python_devops_logging_decorators-0.1.4-py3-none-any.whl.
File metadata
- Download URL: python_devops_logging_decorators-0.1.4-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5573993da1369db29cf4b2cef9a3d05e307d2a3fef08b0a0b5622c185d04dca
|
|
| MD5 |
3a92bb7a53a155be9dbfd231f94b80e3
|
|
| BLAKE2b-256 |
23d6dda5a2ac87fc600da589d50d5df0769686691acb4f751ee1538abc7e46db
|