This Flask application serves as an API to fetch and display proposals from the Boardroom platform based on the network and ID parameters provided by the user. It showcases how to integrate external APIs securely using environment variables for API keys.
- Fetch proposals from Boardroom based on network and ID.
- Secure API key management using environment variables.
- Basic API documentation served at the root endpoint.
Before you begin, ensure you have met the following requirements:
- Python 3.6+
- pip
- A Boardroom API key
Clone this repository to your local machine:
git clone https://your-repository-url.git
cd your-repository-directory
Install the required Python packages:
pip install -r requirements.txt
Create a .env
file in the root directory of your project and add your Boardroom API key:
BOARDROOM_KEY=your_api_key_here
Make sure to replace your_api_key_here
with your actual Boardroom API key.
To run the application, use the following command:
flask run
The API will be available at http://localhost:5000.
The API provides endpoints to fetch Boardroom proposals. Here are some example requests you can make:
GET /api/v1/boardroom/proposals/{network}/{id}
Replace {network}
and {id}
with the appropriate values.
To contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b <branch_name>
. - Make your changes and commit them:
git commit -m '<commit_message>'
- Push to the original branch:
git push origin <project_name>/<location>
- Create the pull request.
Alternatively, see the GitHub documentation on creating a pull request.