A Flask dashboard that retrieves data from an external API, processes it automatically, stores the results in SQLite and exposes the stored data through REST API endpoints.
- Fetch data from an external REST API
- Process API responses automatically
- Store synchronized records in SQLite
- Update existing records without creating duplicates
- Track synchronization history
- Display stored records in a web dashboard
- Show total records and unique users
- Handle API and response errors
- REST API endpoints
- Health check endpoint
- Responsive web interface
- Python
- Flask
- Flask-SQLAlchemy
- SQLAlchemy
- SQLite
- Requests
- HTML
- CSS
- REST API
The application uses JSONPlaceholder as a public test API.
https://jsonplaceholder.typicode.com/posts
The API provides sample post data that is retrieved, processed and stored locally.
- The user clicks
Sync API Data. - The Flask application requests data from the external API.
- The response is validated and processed.
- New records are stored in SQLite.
- Existing records are updated instead of duplicated.
- A synchronization result is stored.
- The dashboard displays the processed data and synchronization status.
GET /api/records
Returns all synchronized records as JSON.
GET /api/status
Returns the current application status, number of stored records and last synchronization information.
GET /health
Example response:
{
"project": "API Data Automation Dashboard",
"status": "running"
}Clone the repository:
git clone https://github.com/heldermpereira09-max/api-data-automation-dashboard.git
cd api-data-automation-dashboardCreate a virtual environment:
python -m venv venvActivate it on Windows:
.\venv\Scripts\Activate.ps1Install the dependencies:
python -m pip install -r requirements.txtRun the application:
python app.pyOpen in your browser:
http://127.0.0.1:5000
Click Sync API Data to retrieve and process the dataset.
This project demonstrates practical Python automation, external API integration, data processing, SQLite database persistence, Flask development and REST API design.
Helder Pereira
