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.1rc9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4df0864cbd3da3817d4ceaa1708c635629ca90c26325a21de686d6dfc764e3ff |
|
MD5 | 89b397b91e14b12ddcac9259b3ef3241 |
|
BLAKE2b-256 | 82763f63c9206965e0f3d9e0c218da45354678a3000e37e43299b9765f29acf7 |
Close
Hashes for surquest_fastapi_schemas-0.0.1rc9-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a74a645635dd606a285957876037b363e3beb7f4c525be02f2dcdf799bf17060 |
|
MD5 | 42ee62a34a976571eb00772f899afd65 |
|
BLAKE2b-256 | 0cb183b1650b4d3fa90a1b783bd638bd5b3e3187084f5d6860546c6c751821db |