{"id":13941191,"url":"https://github.com/app-generator/sample-flask-charts-js","last_synced_at":"2025-10-18T19:56:16.685Z","repository":{"id":100503231,"uuid":"482167477","full_name":"app-generator/sample-flask-charts-js","owner":"app-generator","description":"Flask Charts - Flask-RestX and Charts.JS | AppSeed","archived":false,"fork":false,"pushed_at":"2022-11-25T15:57:38.000Z","size":2292,"stargazers_count":12,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-11T05:55:55.095Z","etag":null,"topics":["appseed-sample","chartjs","flask-restx-api","flask-sample"],"latest_commit_sha":null,"homepage":"https://blog.appseed.us/flask-charts-js-and-flask-restx-s92/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/app-generator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-16T05:44:44.000Z","updated_at":"2025-03-04T07:52:39.000Z","dependencies_parsed_at":"2023-05-27T08:01:12.407Z","dependency_job_id":null,"html_url":"https://github.com/app-generator/sample-flask-charts-js","commit_stats":null,"previous_names":[],"tags_count":2,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fsample-flask-charts-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fsample-flask-charts-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fsample-flask-charts-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fsample-flask-charts-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/app-generator","download_url":"https://codeload.github.com/app-generator/sample-flask-charts-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244331713,"owners_count":20435982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appseed-sample","chartjs","flask-restx-api","flask-sample"],"created_at":"2024-08-08T02:01:13.744Z","updated_at":"2025-10-18T19:56:16.580Z","avatar_url":"https://github.com/app-generator.png","language":"JavaScript","readme":"# [Flask Charts via Flask-RestX](https://blog.appseed.us/flask-charts-js-and-flask-restx-s92/)\n\nSample project crafted with `Flask`, `Charts.JS`, and `Flask-RestX` to showcase how to plot different charts **Pie, Line and Bar Charts**. Frontend uses `Bootstrap5` for styling and `Chart.js` for dynamic charts. The dataset is loaded via a custom **Flask CLI** and the project homepage showcases three charts type: `line`, `bar` and `pie`. \n\n- 👉 [Charts via Flask-RestX](https://flask-charts-via-restx.appseed-srv1.com/) - LIVE Demo\n- 👉 Free [support](https://appseed.us/support) via `email` and [Discord](https://discord.gg/fZC6hup).\n\n\u003cbr /\u003e\n\n\u003e Features:\n\n- ✅ `Up-to-date dependencies`\n- ✅ `Stack`: Flask\n- ✅ `API`: Flask-RestX\n- ✅ `DB Tools`: Flask-SqlAlchemy, SQLite\n- ✅ `Charts`: Charts.js\n\n\u003cbr /\u003e\n\n![Flask Charts via Flask-RestX and Charts.js - provided by AppSeed.us](https://user-images.githubusercontent.com/51070104/164218594-2a0a6a4d-618f-4fb8-90ee-7d4d41088466.jpg)\n\n## ✨ How to use it\n\n\u003e 👉 **Clone Sources** (this repo)\n\n```bash\n$ git clone https://github.com/app-generator/blog-sample-flask-charts.git\n$ cd blog-sample-flask-charts\n```\n\n\u003cbr /\u003e\n\n\u003e 👉 **Install Modules** using a Virtual Environment\n\n```bash\n$ virtualenv env\n$ source env/bin/activate\n$ pip3 install -r requirements.txt\n```\n\nOr for **Windows-based Systems**\n\n```bash\n$ virtualenv env\n$ .\\env\\Scripts\\activate\n$\n$ # Install modules - SQLite Database\n$ pip3 install -r requirements.txt\n```\n\n\u003cbr /\u003e\n\n\u003e 👉 **Set up the environment**\n\n```bash\n$ export FLASK_APP=app.py\n$ export FLASK_ENV=development\n```\n\nOr for **Windows-based Systems**\n\n```bash\n$ # CMD terminal\n$ set FLASK_APP=app.py\n$ set FLASK_ENV=development\n$\n$ # Powershell\n$ $env:FLASK_APP = \".\\app.py\"\n$ $env:FLASK_ENV = \"development\"\n```\n\n\u003cbr /\u003e\n\n\u003e 👉 **Load Sample Data** from `data` directory\n\n- `monthly_customers.csv`\n- `monthly_sales.csv`\n- `product_sales.csv`\n\n```bash\n$ flask load-data \n```\n\n\u003cbr /\u003e\n\n\u003e 👉 **Start the APP**\n\n```bash\n$ flask run \n```\n\n\u003cbr /\u003e\n\n## ✨ Code-base structure\n\n```bash\n\u003c PROJECT ROOT \u003e\n   |\n   |-- app.py            # Create and start the APP object\n   |-- api.py            # Simple API node \n   |-- models.py         # app models\n   |\n   |-- data_loader.py    # Save the data in DB\n   |\n   |-- templates\n   |    |-- index.html   # Simple page styled with BS5 \n   |\n   |-- static\n   |    |-- js/custom.js # Code the Charts\n   |\n   |-- *******************\n```\n\n\u003cbr /\u003e\n\n\u003e The bootstrap flow\n\n- `app.py` \n  - bundles all resources\n  - serve the `index.html`\n- `api.py` exposes a simple API using the DB data \n- `templates/index.html`\n  - HOMEpage of the project\n- `js/custom.js`\n  - fetch data exposed by the `API`\n\n\u003cbr /\u003e\n\n---\n[Flask Charts via Flask-RestX](https://blog.appseed.us/flask-charts-js-and-flask-restx-s92/) - provided by [AppSeed](https://appseed.us)\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapp-generator%2Fsample-flask-charts-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapp-generator%2Fsample-flask-charts-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapp-generator%2Fsample-flask-charts-js/lists"}