🚀 PipeLogger Library 🚀
Simplify the generation and management of logs in your data pipelines.
📖 What is PipeLogger?
PipeLogger is a library designed to standardize the creation of logs in data pipelines, providing a consistent format that facilitates problem identification and troubleshooting. With PipeLogger, you can manage detailed and structured logs, enabling more effective tracking of operations and deeper analysis of data ingestion processes.
🚀 Main features
- Log standardization: PipeLogger creates detailed logs that follow a consistent format, making them easy to read and analyze.
- Integration with Google Cloud Platform (GCP): Designed for pipelines deployed on GCP, supporting Cloud Functions and Cloud Run.
- BigQuery Table Monitoring: Logs and monitors the size of BigQuery tables over time.
- Storage in Google Cloud Storage: Automatically stores logs in a GCP bucket for centralized access and management.
🌟 Example of Log Generated
PipeLogger creates logs in a clear and structured JSON format as follows:
{
"PipelineLogs": {
"PipelineID": "Pipeline-Example",
"Timestamp": "MM-DD-YY-THH:MM:SS",
"Status": "Success",
"Message": "Data uploaded successfully",
"ExecutionTime": 20.5075738430023
},
"BigQueryLogs": [
{
"BigQueryID": "project.pipeline-example.table_1",
"Size": 1555
},
{
"BigQueryID": "project.pipeline-example.table_2",
"Size": 3596
}
],
"Details": [
{
"additional_info": [
"Data downloaded successfully",
"Data processed successfully",
"Data uploaded successfully"
]
}
]
}
💻 Implementation
📋 Prerequisites
Before implementing PipeLogger, make sure you meet the following requirements:
- The pipeline must be deployed on Google Cloud Platform (GCP), using Cloud Functions or Cloud Run.
- The pipeline must interact with BigQuery tables.
- A bucket on Google Cloud Storage is required to store the generated logs.
🛠️ How to Implement PipeLogger in your Pipeline
Follow the steps detailed in our Official Documentation to integrate PipeLogger into your pipeline projects.
🧑💻 Example of Basic Use
from pipelogger import logsformatter
import time
# Initialize the log formatter
logger = logsformatter(
pipeline_id="Pipeline-Example",
table_ids=["project.pipeline-example.table_1", "project.pipeline-example.table_2"],
project_id="your-gcp-project-id",
bucket_name="your-gcs-bucket",
folder_bucket="logs_folder"
)
# Simulate pipeline execution
start_time = time.time()
# Simulation of pipeline operations....
# Generate and upload logs
logger.generate_the_logs(
execution_status="Success",
msg="Data uploaded successfully",
start_timer=start_time,
logs_details=["Process completed without errors."]
)
📦 Installation
You can easily install PipeLogger from PyPI using pip:
pip install pipelogger
📚 Complete Documentation
For complete details on implementation, advanced configuration and more usage examples, visit the Official Documentation.
🤝 Contribute
Contributions are welcome! If you have ideas, improvements or have found a bug, please open an issue or submit a pull request in our GitHub repository.
📄 License
This project is licensed under the terms of the MIT License.
📧 Contact
If you have any questions, feel free to contact us through our GitHub page or send us an email.
Metadata
Release files for pipelogger 1.0.1
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 |
|---|---|---|---|---|
| pipelogger-1.0.1.tar.gz | 5.2 kB | Without provenance | Details for pipelogger-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pipelogger-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for pipelogger-1.0.1-py3-none-any.whl |
Total release size: 10.9 kB
Release files / pipelogger-1.0.1.tar.gz
| Download URL | pipelogger-1.0.1.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3461ecbd9920651df320f5bb04d90af4bafdf3f2dbedbd2201badc858f6827c8
|
|
BLAKE2b-256 checksum How to use checksums |
d936a6ea7a3c7445c638fab83f2af0d52983e93632a9a4e198331b79dc435fc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Release files / pipelogger-1.0.1-py3-none-any.whl
| Download URL | pipelogger-1.0.1-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d42e61cd0984ebb7f263332995c5f54758e4bde3c50ed4b01f3b0bbc436d0a90
|
|
BLAKE2b-256 checksum How to use checksums |
6258613504592c4cb1a82e1bf116c0ed2b36b5a335cf1ea8b56d0c9013074365
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Security for pipelogger 1.0.1
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.