This Flask application fetches average interest rates from the Fiscal Data Treasury API. It provides endpoints to check the status of the API and to retrieve the latest average interest rates. Note that alognside your .py file, include a requirements.txt so that the Dockerfile can install the necessary packages with pip.
Features
Endpoint to check API status. Endpoint to fetch average interest rates from the Fiscal Data Treasury API.
Essential Setup Files
- A Dockerfile.
- A compose file to define and run multi-container Docker applications (this is how Defang identifies services to be deployed). This is optional
Prerequisite
- Download Defang CLI
- If you are using Defang BYOC, make sure you have properly authenticated your AWS account (optional)
A Step-by-Step Guide
- Open the terminal and type
defang login - Type
defang compose upin the CLI - Your app should be up and running with Defang in minutes!
Title: Python & REST API
Short Description: A Flask application that fetches average interest rates from the Fiscal Data Treasury API.
Tags: Flask, REST API, Python
Languages: python