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.
Metadata
Release files for lhs-global-service-django 1.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lhs_global_service_django-1.0.9.tar.gz | 18.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lhs_global_service_django-1.0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.2 kB
Release files / lhs_global_service_django-1.0.9.tar.gz
| Download URL | lhs_global_service_django-1.0.9.tar.gz |
|---|---|
| Size | 18.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
635f83a23f786787efb81143403d6f8508de15088c3d192775ccafbe4a20eacc
|
|
BLAKE2b-256 checksum How to use checksums |
a4e1fdcdd0af898a076204c1430e9d7b18753df3b4ab4a0d1d93c7e06e1548a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / lhs_global_service_django-1.0.9-py3-none-any.whl
| Download URL | lhs_global_service_django-1.0.9-py3-none-any.whl |
|---|---|
| Size | 21.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb33919f67fc2d536e5a276b7c5ab89f79f445d48b4f2d0a03b5e6420a3cf6be
|
|
BLAKE2b-256 checksum How to use checksums |
8bb1785719d4843190a1423e4a3b40555f70d11f0aec3829b687859fb983888d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|