Skip to main content

FastAPI Logger: Enhance your FastAPI applications with comprehensive request logging.

Project description

long_description.md

FastAPI Logger is a powerful Python package designed to seamlessly integrate with FastAPI applications, providing advanced request logging capabilities. With FastAPI Logger, you can capture essential details about incoming requests, including sender IP, port, processing time, and more.

Features

  • Request Details: Log sender IP, port, request URL, and processing time for each incoming request.
  • Customizable Logging: Easily customize the logging behavior to include additional parameters or adapt it to your specific requirements.
  • Integration with FastAPI: Integrate the logger seamlessly into your FastAPI application using the provided decorator.
  • Efficient and Lightweight: FastAPI Logger is designed to be efficient and lightweight, ensuring minimal impact on the performance of your FastAPI application.

Installation

You can install FastAPI Logger using pip:

pip install fastapi-logger

Usage
Getting started with FastAPI Logger is straightforward. Simply import the log_request decorator and apply it to your FastAPI endpoints:

from fastapi import FastAPI, Request
from fastapi_logger.logger import log_request

app = FastAPI()

@app.get("/example")
@log_request
def read_item(request: Request):
    # Your endpoint logic here
    return {"message": "Hello, World!"}


FastAPI Logger empowers you to gain valuable insights into your FastAPI application's traffic and performance effortlessly.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi-logger-0.1.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

fastapi_logger-0.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file fastapi-logger-0.1.tar.gz.

File metadata

  • Download URL: fastapi-logger-0.1.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for fastapi-logger-0.1.tar.gz
Algorithm Hash digest
SHA256 a6099a78683860238ca4392b1f38b87d62caebd7ded3580fcb8b131baf9b81c4
MD5 7de6f45eb488c9fe68d4f70c5e1a5da3
BLAKE2b-256 d273da199f36628ce4f3ec1a9782ae80c21b9c078507ea1bb25c7e0584a30a33

See more details on using hashes here.

File details

Details for the file fastapi_logger-0.1-py3-none-any.whl.

File metadata

  • Download URL: fastapi_logger-0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for fastapi_logger-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6dbac123b185fe53d20f8c4cbb6548e9cce82a42196ece8bde90ae63f00a5aa1
MD5 5329f35785b1becf93b928c6b1dc5f62
BLAKE2b-256 dce72eca6501f80cebd7d6cfb2c32f11d9b133c837317d3f9821062c3a4f84a7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page