This project provides collection of standard schemas for FastAPI framework as: startDate, endDate, offset, limit, etc.
Project description
Introduction
This project provides collection of commonly used schemas for FastAPI.
Quick Start
This section shows how to use the utilities provided by this project:
from fastapi import FastAPI
from surquest.fastapi.schemas.args import Args
app = FastAPI()
@app.get("/users")
async def get_users(
offset: Args.offset().type_ = Args.offset().query,
limit: Args.limit().type_ = Args.limit().query,
):
return [{
"id": 1,
"name": "John Doe"
}]
Local development
You are more than welcome to contribute to this project. To make your start easier we have prepared a docker image with all the necessary tools to run it as interpreter for Pycharm or to run tests.
Build docker image
docker build `
--tag surquest/fastapi/schemas `
--file package.base.dockerfile `
--target test .
Run tests
docker run --rm -it `
-v "${pwd}:/opt/project" `
-w "/opt/project/test" `
surquest/fastapi/schemas pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for surquest_fastapi_schemas-0.0.1rc7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44dadc792430b4c6cffc2312ee4ad300581ca93396fc3ab7e32bff1391f3a9b2 |
|
MD5 | 5ac7f4d38ff1375b07101937468effea |
|
BLAKE2b-256 | cada79cf09fbdef26384522af0633c7095444e26420b20eeace62c5bcc63c4be |
Close
Hashes for surquest_fastapi_schemas-0.0.1rc7-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09b6ac6d5cf557c52b73ebc81508473bc88580a4ab2236a6b29a0ca9f1dd2799 |
|
MD5 | 909d20d113e8ccf0480a5ffa09153892 |
|
BLAKE2b-256 | 952b2092cfcb9c5362a3d33c52132f32da1d4c8d43b8e9ed8f79b6189fda21ce |