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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file surquest_fastapi_schemas-0.0.1rc10.tar.gz.
File metadata
- Download URL: surquest_fastapi_schemas-0.0.1rc10.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f48c640ccc8787fa1b80b1a838765f63d9c02e6687a514467f43f2feaa91881
|
|
| MD5 |
d1c66ce17d7f8d9b94a4dcedf8c0acc5
|
|
| BLAKE2b-256 |
dea470af62f08464eaedb15315557db65b2ea5eeb70f3398675c32611f040797
|
File details
Details for the file surquest_fastapi_schemas-0.0.1rc10-py2.py3-none-any.whl.
File metadata
- Download URL: surquest_fastapi_schemas-0.0.1rc10-py2.py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bff23e0c103d8641882b7c875af7497939d45ce672ecd621e81cfb1a1457dac0
|
|
| MD5 |
6eb8ae700b7af7fd6c0fc08e30b3954b
|
|
| BLAKE2b-256 |
a4b626a7ba64274709d9d0ffc602fa729abd05f7105ac180d29271cebae62b25
|