Skip to main content

FastAPI X-ray 🔥

This TUI is designed to streamline the debugging process by providing a comprehensive view of request/response data and tracking all executed SQL queries. This tool empowers developers to effectively diagnose and resolve issues related to database interactions.

Key Features:

  • Request/Response Data Debugging: Gain deep insights into the data exchanged between client applications and the server. Easily identify and analyze the content and structure of both incoming requests and outgoing responses.

  • SQL Query Tracking: Track every SQL query executed during the application runtime. Monitor query performance, detect bottlenecks, and optimize database interactions for enhanced efficiency.

Screenshots

image

image

Installation

Install this package from pypi using this command.

pip install fastapi-xray

Usage

It is very easy to use. Call the start_xray function to start intercepting all the request and response.

from fastapi import FastAPI
from sqlalchemy import create_engine

from fastapi_xray import start_xray

# create SQLAlchemy engine
engine = create_engine("sqlite:///app.db")

app = FastAPI()

# Pass the instance of app and sql engine to the function.
# Passing the sql engine instance is optional
# if you are not using any database.
# NOTE: Not recommended to use it in the production.

if os.environ["DEBUG"]:
    start_xray(app, engine)

Start the CLI to see the incoming requests in the terminal. Use this command to start the terminal interface.

fastapi_xray # starts the xray server at 8989 port

Use the --help command to see all the configurable options.

Release files for fastapi-xray 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastapi-xray 0.1.1
File Size Uploaded
fastapi_xray-0.1.1.tar.gz 11.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fastapi-xray 0.1.1
File Interpreter ABI Platform
fastapi_xray-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size:26.7 kB

Release files / fastapi_xray-0.1.1.tar.gz

Download URL fastapi_xray-0.1.1.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a49ffc2d040053cfaa87cd941579cb74836054e8d93f59ab3c1c2fd799a06f36
BLAKE2b-256 checksum
How to use checksums
e49fbcf565dd2fc485a247aff3abcd426da786bcb5499ccd2dd73cbfe427623e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / fastapi_xray-0.1.1-py3-none-any.whl

Download URL fastapi_xray-0.1.1-py3-none-any.whl
Size 15.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8814c58189df579e69c851a324034377531b7fe8eda8162ec6a981c3fed31220
BLAKE2b-256 checksum
How to use checksums
51e34225ecabd331d008f0968dda08e838fca1380039c409b80ec293df1b5a64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page