make your flask app become restful and modern
Project description
frest
make your flask app become restful and modern
from flask import Flask
from pydantic import BaseModel
from frest import restful
app = Flask(__name__)
class Person(BaseModel):
name: str
age: int
@app.get("/person")
@restful
def list_person():
person = Person(name='jun', age=24)
return person
@app.post("/person")
@restful
def create_person(person: Person):
# creating...
return person
todo list
- auto serialize input/output json
- auto generate openapi doc
- ...
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
flask_frest-0.1.0.tar.gz
(1.9 kB
view details)
Built Distribution
File details
Details for the file flask_frest-0.1.0.tar.gz
.
File metadata
- Download URL: flask_frest-0.1.0.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06147f494db17899d6723aa6981678103017e6309cee87ac58ae8214a0ff0b92 |
|
MD5 | 0200689ad70b26ba76404857354f9905 |
|
BLAKE2b-256 | 7e3aa8088f2fff3a81423c451a016caafbbecdee17a84e3aeaa45b7490abd291 |
File details
Details for the file flask_frest-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: flask_frest-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 711e0277906444c9a87fc8d995083cf4699b9f2f5d73fb1d83bb33e05f812f6b |
|
MD5 | fba756c78b8b3b52146a8d5d3114f27f |
|
BLAKE2b-256 | 1896b6c0d65d0b87c6f34362f76dc00ebc208a612856f77797c6af59d1501536 |