This API has the functionality to provide access to Life Cycle Assessment information through the databases provided by the OpenLCA Nexus software.
Installation and Requirements • How to run • Api documentation • Architecture • License
These instructions will get you a copy of the project up and running on your local machine for development.
These instructions will get you a copy of the project up and running on your local machine for development. Before we install the application we need these systems and tools configured and installed:
It is very easy to install and upload the application. Just follow the steps below and everything will be fine! 🎉
git clone https://github.com/thalees/life-cycle-assessment-api.git
cd life-cycle-assessment-api
After accessing the project folder, create and activate your virtual environment
virtualenv venv && . venv/bin/activate
Install the necessary dependencies:
pip3 install -r requirements.txt
To run the calculation flow it is necessary to go up and configure the infrastructure and create the queue that will be used by the application. To mock AWS services we are using localstack. To run it, just run the command below:
docker-compose up -d
After the localstack container has successfully uploaded, create the queue in SQS using the make command:
make create-queue
OpenLCA or Olca is the system responsible for the data used to calculate the carbon footprint of products. This application must be configured and running on port 8084.
📢 The data used for this application were the data available on the Open LCA website free of charge. We chose the database called Agribalyse.
After performing the initial setup, with your virtual environment active, just run the server:
uvicorn main:app
Your application will be running on localhost:8000
This project has all its endpoints documented in Postman as a shared collection, to get a copy of its endpoints, just click the link below:
If you want to see the documentation on the swagger, just click the button below to view:
📢 This button execute the documentation on the endpoint
/docin your local environment (localhost).
TODO
This project is licensed under the MIT License - see the LICENSE file for details.
Thanks and good tests 🎉
