This release is a pre-release and may not be stable for production use.
pyfa-converter-v2
Allows you to convert Pydantic models for FastAPI param models - query, form, header, cookie, body, etc.
The project is originally written by dotX12 at dotX12/pyfa-converter, but it doesn't support Pydantic v2, so we made a fork of the project with some changes:
- Added support for pydantic v2
- Added tests
- Re-licensed the code to LGPL 3.0
- Added mypy, flake8, isort checks
- Removed dead code
The project may be archived if the original package author upgrades to Pydantic v2 (dotX12/pyfa-converter#25).
Currently, the library does not fully reflect the requirements in OpenAPI (e.g. gt parameter will be required, but this will not be specified in FastAPI docs).
How to install?
pip install pyfa_converter_v2
How to simplify your life?
from fastapi import FastAPI
from pydantic import BaseModel
from pyfa_converter_v2 import QueryDepends
app = FastAPI()
class ArticleSchema(BaseModel):
title: str
content: str
@app.post("/article")
async def create_article(article: ArticleSchema = QueryDepends(ArticleSchema)):
return {"id": 1, "title": article.title, "content": article.content}
Metadata
Release files for pyfa-converter-v2 2.0.0rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pyfa_converter_v2-2.0.0rc1.tar.gz | 6.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyfa_converter_v2-2.0.0rc1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.2 kB
Release files / pyfa_converter_v2-2.0.0rc1.tar.gz
| Download URL | pyfa_converter_v2-2.0.0rc1.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d505466b29a90d6d7455b3efa77d77eaefa49dcd506670756685d15d5f439843
|
|
BLAKE2b-256 checksum How to use checksums |
096487694101871ce7b4a1bd77a7d0dbf6ef9a361945cfac78a6659d94faa9ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.0 CPython/3.8.18 Linux/6.5.9-300.fc39.x86_64
|
Release files / pyfa_converter_v2-2.0.0rc1-py3-none-any.whl
| Download URL | pyfa_converter_v2-2.0.0rc1-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
575469d88b3917ff3464b145ae437efb499cbc8dd105733f045846747661e561
|
|
BLAKE2b-256 checksum How to use checksums |
d151a3096c63725d652056c71f82d2fef2ab658b5bc9662cbe9362bb37c2d015
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.0 CPython/3.8.18 Linux/6.5.9-300.fc39.x86_64
|
Security for pyfa-converter-v2 2.0.0rc1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.