fast-api-stats-0.0.4
توضیحات
Simple stats for fastapi api
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | fast-api-stats-0.0.4 |
| نام | fast-api-stats |
| نسخه کتابخانه | 0.0.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Siddhesh Zantye |
| ایمیل نویسنده | siddheshadsv@icloud.com |
| آدرس صفحه اصلی | https://github.com/FusionSid/API-Stats |
| آدرس اینترنتی | https://pypi.org/project/fast-api-stats/ |
| مجوز | - |
# Api-Stats
Updates a json file with the function name whenever the function is called
I'm gonna use this with my api so im calling it api-stats
Download:
```
pip install fast-api-stats
```
## Example Usage:
```py
from fastapi import FastAPI
from fastapistats import Stats
app = FastAPI()
# Add this line if you want a custom location for you json file
Stats.file_name = "json_files/stats.json"
# you can also make a variable with the class and use that instead of @Stats.update_stats
update = Stats.update_stats
@app.get("/name")
@update(name="name") # if the name kwarg is not passed it will default to the function name
def show_name(name : str): # This is just an example endpoint
return {"your_name" : name}
```
نحوه نصب
نصب پکیج whl fast-api-stats-0.0.4:
pip install fast-api-stats-0.0.4.whl
نصب پکیج tar.gz fast-api-stats-0.0.4:
pip install fast-api-stats-0.0.4.tar.gz