A simple tool designed to automatically generate usable types, functions, and other useful server-side code from a list of [FastAPI](https://fastapi.tiangolo.com/) application to a given framework.
Project description
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.
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
File details
Details for the file fast2app-1.2.1.tar.gz
.
File metadata
- Download URL: fast2app-1.2.1.tar.gz
- Upload date:
- Size: 28.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.9 Linux/5.10.0-31-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff7f3162db285ac69ff1f8343a182959685d7762ef4537afaefa6bb77a812633 |
|
MD5 | 27ccf2f36bf23c724bbd05b61bc5c01f |
|
BLAKE2b-256 | 51e66c957c791572aa1025b28f813c287aa3dc53eecbc5e19f014d7e4b766d00 |
File details
Details for the file fast2app-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: fast2app-1.2.1-py3-none-any.whl
- Upload date:
- Size: 46.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.9 Linux/5.10.0-31-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec9dfd12824f471374b7ff94949506ac78615b5883c85d451ca6f0120b3928c6 |
|
MD5 | 33914373b9d92d4d1b72496b6ecd6666 |
|
BLAKE2b-256 | 2de8c6f73655783e55f77f9dd23eef42a44caceb7578eab63b6ac51d25eef35d |