fastapi-gae-logging 0.0.7__tar.gz → 0.0.8__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.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastapi-gae-logging
3
- Version: 0.0.7
4
- Summary: Custom Cloud Logging handler for FastAPI applications deployed in Google App Engine. Groups logs coming from the same request lifecycle and propagates the maximum log level throughout the request lifecycle using middleware and context management.
3
+ Version: 0.0.8
4
+ Summary: Custom Cloud Logging handler for FastAPI (or any Starlette based) applications deployed in Google App Engine. Groups logs coming from the same request lifecycle and propagates the maximum log level throughout the request lifecycle using middleware and context management.
5
5
  Home-page: https://github.com/chrisK824/fastapi-gae-logging
6
6
  Author: Chris Karvouniaris
7
7
  Author-email: christos.karvouniaris247@gmail.com
@@ -11,11 +11,11 @@ Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.8
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
- Requires-Dist: fastapi
14
+ Requires-Dist: starlette
15
15
  Requires-Dist: google-cloud-logging
16
16
 
17
17
  # fastapi-gae-logging
18
- Custom Cloud Logging handler for FastAPI applications deployed in Google App Engine to ease out logs analysis and monitoring through Google Cloud Log Explorer.
18
+ Custom Cloud Logging handler for FastAPI (or any Starlette based) applications deployed in Google App Engine to ease out logs analysis and monitoring through Google Cloud Log Explorer.
19
19
 
20
20
  ## What problem does this package solve? Why do we need this?
21
21
  When deploying FastAPI applications on Google App Engine, I encountered several challenges with logging and observability even when using the official package for this purpose, `google-cloud-logging`.
@@ -57,7 +57,7 @@ The `fastapi-gae-logging` module addresses these problems by:
57
57
 
58
58
  ```python
59
59
  FastAPIGAELoggingHandler(
60
- app: FastAPI,
60
+ app: Starlette,
61
61
  request_logger_name: Optional[str] = None,
62
62
  log_payload: bool = True,
63
63
  *args, **kwargs
@@ -65,7 +65,7 @@ FastAPIGAELoggingHandler(
65
65
  ```
66
66
 
67
67
  - Parameters
68
- - **app** (FastAPI): The FastAPI application instance.
68
+ - **app** (FastAPI | Starlette): The FastAPI or Starlette application instance.
69
69
  - **request_logger_name** (Optional[str], optional): The name of the Cloud Logging logger to use for request logs.
70
70
  Defaults to the Google Cloud Project ID with the suffix '-request-logger'.
71
71
 
@@ -166,7 +166,7 @@ def post_payload(payload: Any = Body(None)):
166
166
  ## Dependencies
167
167
  This tool is built upon the following packages:
168
168
 
169
- - `fastapi`: A modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints.
169
+ - `starlette`: A modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints.
170
170
  - `google-cloud-logging`: Google Cloud Logging API client library for logging and managing logs in Google Cloud Platform.
171
171
 
172
172
 
@@ -1,5 +1,5 @@
1
1
  # fastapi-gae-logging
2
- Custom Cloud Logging handler for FastAPI applications deployed in Google App Engine to ease out logs analysis and monitoring through Google Cloud Log Explorer.
2
+ Custom Cloud Logging handler for FastAPI (or any Starlette based) applications deployed in Google App Engine to ease out logs analysis and monitoring through Google Cloud Log Explorer.
3
3
 
4
4
  ## What problem does this package solve? Why do we need this?
5
5
  When deploying FastAPI applications on Google App Engine, I encountered several challenges with logging and observability even when using the official package for this purpose, `google-cloud-logging`.
@@ -41,7 +41,7 @@ The `fastapi-gae-logging` module addresses these problems by:
41
41
 
42
42
  ```python
43
43
  FastAPIGAELoggingHandler(
44
- app: FastAPI,
44
+ app: Starlette,
45
45
  request_logger_name: Optional[str] = None,
46
46
  log_payload: bool = True,
47
47
  *args, **kwargs
@@ -49,7 +49,7 @@ FastAPIGAELoggingHandler(
49
49
  ```
50
50
 
51
51
  - Parameters
52
- - **app** (FastAPI): The FastAPI application instance.
52
+ - **app** (FastAPI | Starlette): The FastAPI or Starlette application instance.
53
53
  - **request_logger_name** (Optional[str], optional): The name of the Cloud Logging logger to use for request logs.
54
54
  Defaults to the Google Cloud Project ID with the suffix '-request-logger'.
55
55
 
@@ -150,7 +150,7 @@ def post_payload(payload: Any = Body(None)):
150
150
  ## Dependencies
151
151
  This tool is built upon the following packages:
152
152
 
153
- - `fastapi`: A modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints.
153
+ - `starlette`: A modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints.
154
154
  - `google-cloud-logging`: Google Cloud Logging API client library for logging and managing logs in Google Cloud Platform.
155
155
 
156
156
 
@@ -5,7 +5,7 @@ import os
5
5
  import re
6
6
  import json
7
7
  from typing import Optional, Dict, Any
8
- from fastapi import FastAPI
8
+ from starlette.applications import Starlette
9
9
  from starlette.exceptions import HTTPException
10
10
  from starlette.types import ASGIApp, Receive, Scope, Send
11
11
  from starlette.responses import Response
@@ -247,7 +247,7 @@ class FastAPIGAELoggingHandler(CloudLoggingHandler):
247
247
 
248
248
  def __init__(
249
249
  self,
250
- app: FastAPI,
250
+ app: Starlette,
251
251
  request_logger_name: Optional[str] = None,
252
252
  log_payload: bool = True,
253
253
  *args, **kwargs
@@ -256,7 +256,7 @@ class FastAPIGAELoggingHandler(CloudLoggingHandler):
256
256
  Initialize the handler.
257
257
 
258
258
  Args:
259
- app (FastAPI): The FastAPI application instance.
259
+ app (FastAPI | Starlette): The FastAPI or Starlette application instance.
260
260
  request_logger_name (Optional[str]): The name of the Cloud Logging logger to use for request logs.
261
261
  Defaults to the Google Cloud Project ID with '-request-logger' suffix.
262
262
  log_payload (bool): Whether to log the request payload for certain HTTP methods. Defaults to True.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastapi-gae-logging
3
- Version: 0.0.7
4
- Summary: Custom Cloud Logging handler for FastAPI applications deployed in Google App Engine. Groups logs coming from the same request lifecycle and propagates the maximum log level throughout the request lifecycle using middleware and context management.
3
+ Version: 0.0.8
4
+ Summary: Custom Cloud Logging handler for FastAPI (or any Starlette based) applications deployed in Google App Engine. Groups logs coming from the same request lifecycle and propagates the maximum log level throughout the request lifecycle using middleware and context management.
5
5
  Home-page: https://github.com/chrisK824/fastapi-gae-logging
6
6
  Author: Chris Karvouniaris
7
7
  Author-email: christos.karvouniaris247@gmail.com
@@ -11,11 +11,11 @@ Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.8
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
- Requires-Dist: fastapi
14
+ Requires-Dist: starlette
15
15
  Requires-Dist: google-cloud-logging
16
16
 
17
17
  # fastapi-gae-logging
18
- Custom Cloud Logging handler for FastAPI applications deployed in Google App Engine to ease out logs analysis and monitoring through Google Cloud Log Explorer.
18
+ Custom Cloud Logging handler for FastAPI (or any Starlette based) applications deployed in Google App Engine to ease out logs analysis and monitoring through Google Cloud Log Explorer.
19
19
 
20
20
  ## What problem does this package solve? Why do we need this?
21
21
  When deploying FastAPI applications on Google App Engine, I encountered several challenges with logging and observability even when using the official package for this purpose, `google-cloud-logging`.
@@ -57,7 +57,7 @@ The `fastapi-gae-logging` module addresses these problems by:
57
57
 
58
58
  ```python
59
59
  FastAPIGAELoggingHandler(
60
- app: FastAPI,
60
+ app: Starlette,
61
61
  request_logger_name: Optional[str] = None,
62
62
  log_payload: bool = True,
63
63
  *args, **kwargs
@@ -65,7 +65,7 @@ FastAPIGAELoggingHandler(
65
65
  ```
66
66
 
67
67
  - Parameters
68
- - **app** (FastAPI): The FastAPI application instance.
68
+ - **app** (FastAPI | Starlette): The FastAPI or Starlette application instance.
69
69
  - **request_logger_name** (Optional[str], optional): The name of the Cloud Logging logger to use for request logs.
70
70
  Defaults to the Google Cloud Project ID with the suffix '-request-logger'.
71
71
 
@@ -166,7 +166,7 @@ def post_payload(payload: Any = Body(None)):
166
166
  ## Dependencies
167
167
  This tool is built upon the following packages:
168
168
 
169
- - `fastapi`: A modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints.
169
+ - `starlette`: A modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints.
170
170
  - `google-cloud-logging`: Google Cloud Logging API client library for logging and managing logs in Google Cloud Platform.
171
171
 
172
172
 
@@ -1,2 +1,2 @@
1
- fastapi
1
+ starlette
2
2
  google-cloud-logging
@@ -2,8 +2,8 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="fastapi-gae-logging",
5
- version="0.0.7",
6
- description="Custom Cloud Logging handler for FastAPI applications deployed in Google App Engine. \
5
+ version="0.0.8",
6
+ description="Custom Cloud Logging handler for FastAPI (or any Starlette based) applications deployed in Google App Engine. \
7
7
  Groups logs coming from the same request lifecycle and propagates the maximum log level \
8
8
  throughout the request lifecycle using middleware and context management.",
9
9
  long_description=open("README.md").read(),
@@ -13,7 +13,7 @@ setup(
13
13
  author_email="christos.karvouniaris247@gmail.com",
14
14
  packages=find_packages(),
15
15
  install_requires=[
16
- "fastapi",
16
+ "starlette",
17
17
  "google-cloud-logging",
18
18
  ],
19
19
  python_requires=">=3.8",