fastapp-0.1.7
توضیحات
Machine Learning ASGI Server with FastAPI
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | fastapp-0.1.7 |
| نام | fastapp |
| نسخه کتابخانه | 0.1.7 |
| نگهدارنده | ['Justin Flannery'] |
| ایمیل نگهدارنده | ['juftin@juftin.com'] |
| نویسنده | Justin Flannery |
| ایمیل نویسنده | juftin@juftin.com |
| آدرس صفحه اصلی | https://github.com/juftin/fastapp |
| آدرس اینترنتی | https://pypi.org/project/fastapp/ |
| مجوز | - |
# FastApp
HTTP Apps Made Easier with FastApp
## Installation
```shell
pip install fastapp
```
## Using Out the Example Server
```shell
pip install fastapp[example]
```
```shell
fastapp serve-debug fastapp.app.example:app
```
## Using FastApp to build an app
Create a Python File with Endpoints, we'll call this `main.py`:
```python
from datetime import datetime
from fastapp.app import app
@app.get("/hello")
def custom_endpoint() -> dict:
""""
This is a Custom API Endpoint
"""
return dict(timestamp=datetime.now(),
hello="world")
```
Then, using the `FastApp` CLI we can serve this App:
```shell
fastapp serve-debug main:app
```
...or via docker:
```shell
docker run --rm -it \
--publish 8080:8080 \
--volume ${PWD}/main.py:/root/fastapp/main.py \
juftin/fastapp:latest \
serve-debug main:app
```
Test out our new endpoint:
```shell
curl \
--request GET \
--header "Content-Type: application/json" \
http://localhost:8080/hello
```
Alternatively, if we want to serve this app using Gunicorn, Nginx, and the UvicornWorker we can use
the `serve` command:
```shell
fastapp serve main:app
```
I prefer doing this within a docker container so you don't have to run Nginx on the host machine:
```shell
docker run --rm -it \
--publish 8080:8080 \
--volume ${PWD}/main.py:/root/fastapp/main.py \
juftin/fastapp:latest \
serve main:app
```
نیازمندی
| مقدار | نام |
|---|---|
| - | FastApi |
| - | pydantic |
| - | gunicorn |
| - | uvicorn |
| - | click |
| - | jinja2 |
| - | pyyaml |
| - | tox |
| - | pytest |
| - | coverage |
| - | flake8 |
| - | numpy |
| - | pandas |
| - | nltk |
| - | joblib |
| - | gensim |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl fastapp-0.1.7:
pip install fastapp-0.1.7.whl
نصب پکیج tar.gz fastapp-0.1.7:
pip install fastapp-0.1.7.tar.gz