I wanted a quick visual answer to “how many uploads have actually landed this month?” This Flask dashboard queries a Notion production calendar and turns its uploaded records into a donut chart, with the same counts available as JSON. Bring your own database and integration, then adapt the goal or chart to fit your workflow.
Click preview above to watch illustrated architecture overview.
- Share a Notion database with your own integration. The app expects
Name(title),Status(status), andUpload Due Date(date). It counts records markedUploadedwhose due date is in the current month. - Set
NOTION_API_KEYandDATABASE_IDin your shell environment. Keep the integration token outside the repository. - Build and start the included Python 3.10 container.
docker build -t notion-chart-maker .
docker run --rm -p 127.0.0.1:8080:8080 -e NOTION_API_KEY -e DATABASE_ID notion-chart-makerOpen localhost:8080. The chart refreshes from the server, and /api/interactive-chart returns the counts and chart image. The goal defaults to five uploads and is set in main.py. This version uses the Notion database-query interface pinned by its dependency set.
flowchart LR
Notion[Notion database] -->|Integration API| Flask[Flask app]
Flask -->|Monthly uploaded count| Chart[Donut chart]
Flask -->|JSON and chart image| Browser[Browser dashboard]
The app needs a Notion integration with access to the selected database. Bind the container to loopback as shown above, and do not commit or share the integration token.