Flask Dynamic API - New Tool for Developers
This tool aims to provide a secure, production-ready API via Flask-RestX using the developer's minimum amount of code.
Hello Coders! This article presents Flask Dynamic API, our latest tool built for developers. The project helps developers to expose a secure API over any model defined in the app via a minimum amount of configuration code (basically a single line).
- 👉 1# - Define your model in
apps/models.py
- 👉 2# - Enable the model in the
configuration
- 👉 3# -
Migrate
the project
Step 2 is introduced to empower the developer to filter exposed models with ease. Once the above steps are finished, the CRUD operations (Create, Read, Update, Delete) are available via localhost/api/<MODEL_NAME>/
URI.
Curios minds can find out more about the usage of this tool by watching this video presentation published on yTube:
✨ How it works
Once the source code of the project is downloaded into a local environment, we need to follow the steps:
- create and activate a virtual environment
- install the project dependencies
- edit
apps/models.py
to include the model definition - activate the model in config (DYNAMIC_API variable)
- Migrate the app
Once all the above steps are executed, our API should be up & running.
👉 How the API is secured
Security is an important aspect of any service and this Dynamic API tool, in order to be useful and production-ready provides a security layer that isolates the mutating access (PUT, POST) for registered users. Â
The API can be used in two ways:
- APP templates - security token is provided by the backend
- 3rd party tools (POSTMAN) - the security token is delivered by a
/login
request
For more information, please watch this video presentation. In case something is missing, feel free to contact the support team via email or chat on Discord (24/7 LIVE assistance). Â Â
Thanks for reading! For more resources and support, feel free to access:
- ✨ More Free Dashboards crafted in Django, Flask, and React
- ✨ More Admin Dashboards - a huge index with products Â