Skip to main content

This project provides collection of standard schemas for FastAPI framework as: startDate, endDate, offset, limit, etc.

Project description

GitHub GitHub Workflow Status (with branch) Coverage PyPI - Downloads PyPI

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

surquest_fastapi_schemas-0.0.1rc10.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

surquest_fastapi_schemas-0.0.1rc10-py2.py3-none-any.whl (6.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file surquest_fastapi_schemas-0.0.1rc10.tar.gz.

File metadata

File hashes

Hashes for surquest_fastapi_schemas-0.0.1rc10.tar.gz
Algorithm Hash digest
SHA256 7f48c640ccc8787fa1b80b1a838765f63d9c02e6687a514467f43f2feaa91881
MD5 d1c66ce17d7f8d9b94a4dcedf8c0acc5
BLAKE2b-256 dea470af62f08464eaedb15315557db65b2ea5eeb70f3398675c32611f040797

See more details on using hashes here.

File details

Details for the file surquest_fastapi_schemas-0.0.1rc10-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for surquest_fastapi_schemas-0.0.1rc10-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bff23e0c103d8641882b7c875af7497939d45ce672ecd621e81cfb1a1457dac0
MD5 6eb8ae700b7af7fd6c0fc08e30b3954b
BLAKE2b-256 a4b626a7ba64274709d9d0ffc602fa729abd05f7105ac180d29271cebae62b25

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page