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
- ...
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.2.tar.gz
(2.4 kB
view details)
Built Distribution
File details
Details for the file flask_frest-0.1.2.tar.gz
.
File metadata
- Download URL: flask_frest-0.1.2.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c488204b2cc614c13c3fc778bffb21399ddce57cb929e15c20d00a5ce9079ac5 |
|
MD5 | bbcf025cc254191a790b8fdb445c78e5 |
|
BLAKE2b-256 | 0bd1e21c70a66ee357c07b7f77746575d9c3dfbfefd889b275f1f30f31de394c |
File details
Details for the file flask_frest-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: flask_frest-0.1.2-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f333c510401668719c660e2b2d26258f2af0157d616769932fdad693e4314ca9 |
|
MD5 | 54935802e9f92c2fd45424d2dd5ad4a3 |
|
BLAKE2b-256 | b605a06de5b0dcc490ecb720b8c8e15861763df0c3936049ac05377f5845e123 |