A global logging and service utilities package for Python projects, designed for seamless integration with Django applications. Developed by Lighthouse Info System Pvt Ltd., this package provides robust logging, configuration, and service management tools to enhance reliability and maintainability in Django-based projects.
Project description
global_service
A Python package for global logging, step-wise logging, and Oracle DB activity logging, with robust log delivery and local fallback.
Features
- Centralized logging to a global service (HTTP endpoint)
- Step-wise logger for tracking process steps
- Oracle DB logging for web activity
- Local fallback for failed log delivery
- Fully dynamic configuration via code or environment variables
Installation
pip install global-service
Usage
from global_service import config, build_global_log_payload, send_log_to_global_service, StepLogger, save_step_logs_to_oracle
# Configure dynamically (recommended)
config.configure(
GLOBAL_LOG_URL="http://your-log-server:8000/web_logs",
APP_CODE="MY-APP-CODE",
ORACLE_DB_HOST="dbhost",
ORACLE_DB_PORT=1521,
ORACLE_DB_SERVICE="ORCLPDB",
ORACLE_USER="user",
ORACLE_PASS="pass"
)
# Example: Send a log
payload = build_global_log_payload(request)
send_log_to_global_service(payload)
# Example: Step logger
step_logger = StepLogger()
step_logger.log("Step 1: Started")
step_logger.log("Step 2: Processing")
# ...
save_step_logs_to_oracle(payload, step_logger, request_body, response_body)
License
MIT License
Copyright (c) 2024 [Your Name or Organization]
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 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 lhs_global_service_django-1.0.2.tar.gz.
File metadata
- Download URL: lhs_global_service_django-1.0.2.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
464528925b5937bd73983f1cf54006fc16d244d7ce7993236221c011b5357683
|
|
| MD5 |
00d5b6cf6a992768779252449e3c416a
|
|
| BLAKE2b-256 |
b297fb1f83f33131f76498a5634608df58aefd201e78ab0f8f2964d52dd17ec9
|
File details
Details for the file lhs_global_service_django-1.0.2-py3-none-any.whl.
File metadata
- Download URL: lhs_global_service_django-1.0.2-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
847386700a9ab191aa6692e065ce24f0d77d2a543959ea80256fc79b35bed8ff
|
|
| MD5 |
b95eab580b33fc24978eb670d1fca5bc
|
|
| BLAKE2b-256 |
04d5c0aadc3130691b7847600525312a80141b9f6aef9ae12553af106159d317
|