ganicas-package 0.1.2__tar.gz → 0.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (18) hide show
  1. {ganicas_package-0.1.2 → ganicas_package-0.1.4}/PKG-INFO +11 -11
  2. {ganicas_package-0.1.2 → ganicas_package-0.1.4}/README.md +10 -10
  3. ganicas_package-0.1.4/ganicas_utils/logging/__init__.py +4 -0
  4. ganicas_package-0.1.4/ganicas_utils/logging/__pycache__/__init__.cpython-312.pyc +0 -0
  5. {ganicas_package-0.1.2/src → ganicas_package-0.1.4/ganicas_utils}/logging/__pycache__/configuration.cpython-312.pyc +0 -0
  6. {ganicas_package-0.1.2/src → ganicas_package-0.1.4/ganicas_utils}/logging/__pycache__/formatter.cpython-312.pyc +0 -0
  7. {ganicas_package-0.1.2/src → ganicas_package-0.1.4/ganicas_utils}/logging/__pycache__/logger.cpython-312.pyc +0 -0
  8. {ganicas_package-0.1.2/src → ganicas_package-0.1.4/ganicas_utils}/logging/configuration.py +2 -2
  9. {ganicas_package-0.1.2/src → ganicas_package-0.1.4/ganicas_utils}/logging/formatter.py +1 -1
  10. {ganicas_package-0.1.2/src → ganicas_package-0.1.4/ganicas_utils}/logging/logger.py +1 -1
  11. {ganicas_package-0.1.2 → ganicas_package-0.1.4}/pyproject.toml +2 -2
  12. ganicas_package-0.1.2/src/logging/__init__.py +0 -4
  13. ganicas_package-0.1.2/src/logging/__pycache__/__init__.cpython-312.pyc +0 -0
  14. {ganicas_package-0.1.2/src → ganicas_package-0.1.4/ganicas_utils}/__init__.py +0 -0
  15. {ganicas_package-0.1.2/src → ganicas_package-0.1.4/ganicas_utils}/config.py +0 -0
  16. {ganicas_package-0.1.2/src → ganicas_package-0.1.4/ganicas_utils}/logging/__pycache__/middlewares.cpython-312.pyc +0 -0
  17. {ganicas_package-0.1.2/src → ganicas_package-0.1.4/ganicas_utils}/logging/middlewares.py +0 -0
  18. {ganicas_package-0.1.2/src → ganicas_package-0.1.4/ganicas_utils}/logging/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ganicas-package
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: Ganicas internal Python package for structured logging and utilities.
5
5
  Keywords: logging,utilities,internal-package
6
6
  Author: Ganicas
@@ -33,8 +33,8 @@ More details can be found in the [structlog](https://www.structlog.org/en/stable
33
33
  instead of `logger = logging.getLogger(__name__)` it is `logger = structlog.get_logger(__name__)`
34
34
 
35
35
  ```python
36
- from src.logging import LoggingConfigurator
37
- from src.config import Config
36
+ from ganicas_utils.logging import LoggingConfigurator
37
+ from ganicas_utils.config import Config
38
38
  import structlog
39
39
 
40
40
  config = Config()
@@ -68,8 +68,8 @@ instead of `logger = logging.getLogger(__name__)` it is `logger = structlog.get_
68
68
  In production, you should aim for structured, machine-readable logs that can be easily ingested by log aggregation and monitoring tools like ELK (Elasticsearch, Logstash, Kibana), Datadog, or Prometheus:
69
69
 
70
70
  ```python
71
- from src.logging import LoggingConfigurator
72
- from ssrc.config import Config
71
+ from ganicas_utils.logging import LoggingConfigurator
72
+ from ganicas_utils.config import Config
73
73
  import structlog
74
74
 
75
75
  config = Config()
@@ -121,9 +121,9 @@ The logger is initialized once in the main application file (e.g., app.py).
121
121
  import sys
122
122
  import uuid
123
123
  from flask import Flask, request
124
- from src.logging import LoggingConfigurator
125
- from src.logging.middlewares import add_request_context_flask
126
- from ssrc.config import Config
124
+ from ganicas_utils.logging import LoggingConfigurator
125
+ from ganicas_utils.logging.middlewares import add_request_context_flask
126
+ from ganicas_utils.config import Config
127
127
  import structlog
128
128
 
129
129
  config = Config()
@@ -175,7 +175,7 @@ FastAPI:
175
175
  ```python
176
176
  import uuid
177
177
  from fastapi import FastAPI, Request
178
- from src.logging.middlewares import FastAPIRequestContextMiddleware
178
+ from ganicas_utils.logging.middlewares import FastAPIRequestContextMiddleware
179
179
  import structlog
180
180
 
181
181
  config = Config()
@@ -217,11 +217,11 @@ This a console view, in prod it will be json (using python json logging to have
217
217
 
218
218
  Please install [poetry](https://python-poetry.org/docs/#installation) as this is the tool we use for releasing and development.
219
219
 
220
- poetry install && poetry run pytest -rs --cov=src -s
220
+ poetry install && poetry run pytest -rs --cov=ganicas_utils -s
221
221
 
222
222
  To run tests inside docker:
223
223
 
224
- poetry install --with dev && poetry run pytest -rs --cov=src
224
+ poetry install --with dev && poetry run pytest -rs --cov=ganicas_utils
225
225
 
226
226
  To run pre-commit:
227
227
  poetry run pre-commit run --all-files
@@ -9,8 +9,8 @@ More details can be found in the [structlog](https://www.structlog.org/en/stable
9
9
  instead of `logger = logging.getLogger(__name__)` it is `logger = structlog.get_logger(__name__)`
10
10
 
11
11
  ```python
12
- from src.logging import LoggingConfigurator
13
- from src.config import Config
12
+ from ganicas_utils.logging import LoggingConfigurator
13
+ from ganicas_utils.config import Config
14
14
  import structlog
15
15
 
16
16
  config = Config()
@@ -44,8 +44,8 @@ instead of `logger = logging.getLogger(__name__)` it is `logger = structlog.get_
44
44
  In production, you should aim for structured, machine-readable logs that can be easily ingested by log aggregation and monitoring tools like ELK (Elasticsearch, Logstash, Kibana), Datadog, or Prometheus:
45
45
 
46
46
  ```python
47
- from src.logging import LoggingConfigurator
48
- from ssrc.config import Config
47
+ from ganicas_utils.logging import LoggingConfigurator
48
+ from ganicas_utils.config import Config
49
49
  import structlog
50
50
 
51
51
  config = Config()
@@ -97,9 +97,9 @@ The logger is initialized once in the main application file (e.g., app.py).
97
97
  import sys
98
98
  import uuid
99
99
  from flask import Flask, request
100
- from src.logging import LoggingConfigurator
101
- from src.logging.middlewares import add_request_context_flask
102
- from ssrc.config import Config
100
+ from ganicas_utils.logging import LoggingConfigurator
101
+ from ganicas_utils.logging.middlewares import add_request_context_flask
102
+ from ganicas_utils.config import Config
103
103
  import structlog
104
104
 
105
105
  config = Config()
@@ -151,7 +151,7 @@ FastAPI:
151
151
  ```python
152
152
  import uuid
153
153
  from fastapi import FastAPI, Request
154
- from src.logging.middlewares import FastAPIRequestContextMiddleware
154
+ from ganicas_utils.logging.middlewares import FastAPIRequestContextMiddleware
155
155
  import structlog
156
156
 
157
157
  config = Config()
@@ -193,11 +193,11 @@ This a console view, in prod it will be json (using python json logging to have
193
193
 
194
194
  Please install [poetry](https://python-poetry.org/docs/#installation) as this is the tool we use for releasing and development.
195
195
 
196
- poetry install && poetry run pytest -rs --cov=src -s
196
+ poetry install && poetry run pytest -rs --cov=ganicas_utils -s
197
197
 
198
198
  To run tests inside docker:
199
199
 
200
- poetry install --with dev && poetry run pytest -rs --cov=src
200
+ poetry install --with dev && poetry run pytest -rs --cov=ganicas_utils
201
201
 
202
202
  To run pre-commit:
203
203
  poetry run pre-commit run --all-files
@@ -0,0 +1,4 @@
1
+ from ganicas_utils.logging.configuration import get_default_logging_conf
2
+ from ganicas_utils.logging.logger import LoggingConfigurator
3
+
4
+ __all__ = ["LoggingConfigurator", "get_default_logging_conf"]
@@ -2,7 +2,7 @@ from typing import Any
2
2
 
3
3
  import structlog
4
4
 
5
- from src.config import Config
5
+ from ganicas_utils.config import Config
6
6
 
7
7
 
8
8
  def get_default_logging_conf(log_level: str, formatter: str, formatter_std_lib: str) -> dict[str, Any]:
@@ -14,7 +14,7 @@ def get_default_logging_conf(log_level: str, formatter: str, formatter_std_lib:
14
14
  "format": "%(asctime)s %(levelname)s %(name)s %(message)s",
15
15
  },
16
16
  "json_formatter": {
17
- "()": "src.logging.formatter.LogFormatter",
17
+ "()": "ganicas_utils.logging.formatter.LogFormatter",
18
18
  },
19
19
  "plain_console": {
20
20
  "()": structlog.stdlib.ProcessorFormatter,
@@ -2,7 +2,7 @@ from datetime import datetime, timezone
2
2
 
3
3
  from pythonjsonlogger import jsonlogger
4
4
 
5
- from src.config import config
5
+ from ganicas_utils.config import config
6
6
 
7
7
 
8
8
  class LogFormatter(jsonlogger.JsonFormatter):
@@ -4,7 +4,7 @@ import logging.config
4
4
  import structlog
5
5
  from structlog import contextvars
6
6
  from structlog.typing import EventDict
7
- from src.logging.configuration import get_default_logging_conf
7
+ from ganicas_utils.logging.configuration import get_default_logging_conf
8
8
  from structlog.dev import ConsoleRenderer
9
9
 
10
10
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "ganicas-package"
3
- version = "0.1.2"
3
+ version = "0.1.4"
4
4
  description = "Ganicas internal Python package for structured logging and utilities."
5
5
  authors = ["Ganicas"]
6
6
  readme = "README.md"
@@ -17,7 +17,7 @@ classifiers = [
17
17
  "Programming Language :: Python :: 3.12",
18
18
  "License :: Other/Proprietary License"
19
19
  ]
20
- packages = [{ include = "src" }]
20
+ packages = [{ include = "ganicas_utils" }]
21
21
 
22
22
  [tool.poetry.dependencies]
23
23
  python = ">=3.11,<4.0"
@@ -1,4 +0,0 @@
1
- from src.logging.configuration import get_default_logging_conf
2
- from src.logging.logger import LoggingConfigurator
3
-
4
- __all__ = ["LoggingConfigurator", "get_default_logging_conf"]