A new and easy way to use FLAMA
Report Bug
·
Request Feature
FLAMAPY API provides an abstraction layer over FLAMA, so that it can be used from any environment through requests to this API. In this way, we eliminate project dependencies and standardize a way to consume it for other applications.
Intended workflow explained:
- User deploys the API with Docker (see Instalation)
- User access the API, reads /api/v1/docs
- User can now start using the API
There are a few known bugs that we acknowledge, described in the projects section. If you detect any other new bug, please consider reporting it!
To get a local copy up and running follow these simple example steps.
First, you will need to install Docker.
-
Clone the repository
-
If you are running Windows, run
$ cd flamapy-api
$ ./start-server.cmd
- If you are running Linux or MacOS, run
$ cd flamapy-api
$ ./start-server.sh
This script will build, install and deploy the API in http://localhost:5000, you can access all the endpoints through an application like Postman
All the documentation is registered with Swagger UI and OAS 3.0. It is accesible through /api/v1/docs.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Once you have successfully configured your local development environment, in the /operations folder you will find different methods that work on UVL:
Info: general information about components, such as plugins and operations.
Count: Count something given a model
Find: Find something given a model
Validate: validate something given a model
If these actions represent the functionality you want to add, write the code inside the file. Otherwise, create a new .py file with the verb of the action to be performed. (Example: I want to create and endpoint for modifying the UVL, then, I must create a modify.py file. In this file, create a generic and parameterized method that provides the new functionality.
Now, from the /routes folder, add the endpoint to the corresponding path. (If you created a new file, also create a new path, as shown in the application).
Use Flask Blueprint and import the path from app.py. This way, now the functionality will be accessible from the API in the new endpoint. Don't forget to fully document the method, the path, and update the swagger.yml file in /static to support the new functionality. If the functionality is not properly documented, it will not be added to the main repository!