fast2app package
Description
A simple tool designed to automatically generate usable types, functions, and other useful server-side code from a list of FastAPI application to a given framework.
This is particularly helpful when working with FasttAPI backends applications and wanting to generate types and functions for the frontend.
Currently supported frameworks
Installation
# Install fast2app
pip install fast2app
Requirements
This package is currently compatible with python 3.11 and above.
It requires that you have the quicktype CLI utility installed.
# Install quicktype
npm install -g quicktype
Usage and examples
This package is used as a CLI tool.
# Nuxt3
# You must ammend your nuxt.config.ts file and environement variables in order to use the new generated files. See documentations below.
fast2nuxt --fast-api-app path/to/fastapi/app.py::app_name --export-path path/to/nuxt/app/root/folder -composables
For specific instructions, please see :
Helpdesk
Current Features
Core
- Command line interface with fast2app
- Export FastAPI pydantic model as typescript interfaces in nuxt, including Enums
- Export FastApi as Nuxt API Server
- Export FastApi as Nuxt Composables
Tests
- Base Tests
- Utils Tests
- Export Tests
- CLI Tests
- Integration tests :
- Nuxt :
- Api Server
- Composables
- Nuxt :
- Coverage as artifacts
- Junit reports
Roadmap
Future releases
- Create e more robust documentation in a website
- make it compatible with older python versions
- Refactor package to more easily add support for more frameworks.
- Refactor testing in order to use the same parameters and edge cases for all frameworks.
- Add python framework support.
Ambitions
- Add support for more frameworks (React, Vue, Angular, etc.) with contributions from the community.
Contributing
I've launched into this project as a side task of a bigger endeavor.
Considerig the growing popularity of FastAPI, I think that this tool could be a great addition to the ecosystem and I have decided to make it open source.
I'm new to open source and am open to any ideas, contribution or constructive feedback.
Retrieve the repository
cd existing_repo
git remote add origin https://git.mydh.io/shared/fast2app.git
git branch -M main
git pull origin main
License
This project is licensed under the terms of the MIT license.
Metadata
Release files for fast2app 1.3.0
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 | Actions |
|---|---|---|---|---|
| fast2app-1.3.0.tar.gz | 27.8 kB | Without provenance | Details for fast2app-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fast2app-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for fast2app-1.3.0-py3-none-any.whl |
Total release size: 74.5 kB
Release files / fast2app-1.3.0.tar.gz
| Download URL | fast2app-1.3.0.tar.gz |
|---|---|
| Size | 27.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44e728262eb83e6d6293bd643669a26991f40aec78c3981d30c85eba9ba66da5
|
|
BLAKE2b-256 checksum How to use checksums |
7fdc5054003002bd1f16d4a0ad9795a3906697e2ff2746377dd5f3fbf36481d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.11.9 Linux/5.10.0-31-amd64
|
Release files / fast2app-1.3.0-py3-none-any.whl
| Download URL | fast2app-1.3.0-py3-none-any.whl |
|---|---|
| Size | 46.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
20d433f6f58480f2842f31d1218d9d6d0eabf3caabc576840734ef08e3bee75d
|
|
BLAKE2b-256 checksum How to use checksums |
de082c6b9c0eff3c3b8e0075be3289c5384f4383d2f4388754426d5f65a0a710
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.11.9 Linux/5.10.0-31-amd64
|
Security for fast2app 1.3.0
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.