make your flask app become restful and modern
Project description
flask-frest
make your flask app become fluent and restful
pip install flask-frest
quickstart
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.1.tar.gz
(2.0 kB
view details)
Built Distribution
File details
Details for the file flask_frest-0.1.1.tar.gz
.
File metadata
- Download URL: flask_frest-0.1.1.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42603312d5f4300424349650405eb99d675d7ecf2043108dbf9897843d30106e |
|
MD5 | 48bfadb780465aef0e0b60aebff1eebc |
|
BLAKE2b-256 | 9470431c7ea3f40e97e3eb5fe03b33eacab8ddfef7e99bfd446673aa31537ae2 |
File details
Details for the file flask_frest-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: flask_frest-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 829138f619f9f7fc8e0aecd0340d351140667344f85695c592c7bb8f3f804dce |
|
MD5 | 75bdc30ef5873f4964c2656aaa4538e7 |
|
BLAKE2b-256 | 1caaa063d8e76778bc5c7d3bee05d894f52d99ff26628a9c4a81887088c51d88 |