Skip to main content

fastapi-stats-page

usage

from fastapi import FastAPI
from fastapi_stats_page import StatsRouter, TrackVisitsMiddleware

app = FastAPI()

app.include_router(StatsRouter(title="Statistics of website").router)

app.add_middleware(TrackVisitsMiddleware)

@app.get("/")
async def homepage():
    return "hello world"

this will save visitors ip and user agens to a list

you can also save visitors to a file by doing this

from fastapi import FastAPI
from fastapi_stats_page import StatsRouter, TrackVisitsMiddleware

app = FastAPI()

app.include_router(StatsRouter(title="Statistics of website", get_from="users.txt").router)

app.add_middleware(TrackVisitsMiddleware, save_to="users.txt")

@app.get("/")
async def homepage():
    return "hello world"

Metadata

Release files for fastapi-stats-page 0.1.7

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-stats-page 0.1.7
File Size Uploaded Provenance Actions
fastapi_stats_page-0.1.7.tar.gz 3.5 kB Without provenance Details for fastapi_stats_page-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fastapi-stats-page 0.1.7
File Interpreter ABI Platform Actions
fastapi_stats_page-0.1.7-py3-none-any.whl Python 3 none any Details for fastapi_stats_page-0.1.7-py3-none-any.whl

Total release size: 7.4 kB

Release files / fastapi_stats_page-0.1.7.tar.gz

Download URL fastapi_stats_page-0.1.7.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2f82592a8abf1e945238f088e203b2a8644b7f139d404284e2ca625490deb967
BLAKE2b-256 checksum
How to use checksums
05c7fae386c060f596e6935010b0ac80a2ebbf7f2264d215f7c38b6154d21757
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Release files / fastapi_stats_page-0.1.7-py3-none-any.whl

Download URL fastapi_stats_page-0.1.7-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c14ca3a95e92ca2f9fb00906ccce33bcf88eb693da1127eadf720168f4d78311
BLAKE2b-256 checksum
How to use checksums
497b2c275c78507bcfcc0707c9edd97ba4cbc4660b6b8af2c37e6fc9833a2522
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Security for fastapi-stats-page 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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