Feel free to check the CHANGELOG
🎥 To see CAG in action, click here
Generate CRUD APIs with this powerful and simple CLI program. Currently, this program allows to generate APIs with the following microframeworks :
This program uses a specific file organization for API generation when using Flask :
MyAPI/
└── app/
├── routes.py
├── app.py
└── run.py
app
: This file allows you to configure the global Flask object
routes
: This file contains all the API logic (routes, etc...)
run
: This file allows you to run the API
Generating an API with this program is really easy. Let's see how to do it !
Python 3
It is assumed that you have already installed the framework for which you are going to generate the API.
$ git clone https://github.com/Mazzya/CRUD-API-Generator-DEV.git
If you wish, you can download the project directly here
-h, --help show this help message and exit
--flask Generate a CRUD API with Flask
--fastapi Generate a CRUD API with FastAPI
-v, --version Check current version
-p PATH, --path PATH Path where the API will be generated
Let's see how to generate an API with Flask and FastAPI.
If you wish to generate an API without specifying the directory :
$ generator.py --flask
If you want to generate an API in a specific directory :
$ generator.py --flask -p "C:\Users\HP\Documents"
If you wish to generate an API without specifying the directory :
$ generator.py --fastapi
If you want to generate an API in a specific directory :
$ generator.py --fastapi -p "C:\Users\HP\Documents"
The functions are already available, the only thing left for you to do is to implement the logic and eventually add a database if you need to.
If you find a problem with the program, feel free to report it.
Any contribution is welcome ! If you wish, do not hesitate to fork the project and apply your changes there, when the changes are published create a pull request so that we can review it.
Currently, this program only generates APIs with Flask and FastAPI. It is possible that more frameworks will be added in the next versions.
We have a discord server in case you have any questions or want to be informed about the project news. Do not hesitate to join us, we are waiting for you.