Showcase Your DATA – A simple way using Flask / Simple API / Docker and SQLite

Hello Coders!

This article presents a simple way to showcase your data using Flask, Chartist and Docker. The product that helps us to achieve this is published on Github (MIT License) and the source code can be copied or used in commercial products o…


This content originally appeared on DEV Community and was authored by Sm0ke

Hello Coders!

This article presents a simple way to showcase your data using Flask, Chartist and Docker. The product that helps us to achieve this is published on Github (MIT License) and the source code can be copied or used in commercial products or eLearning activities. Thanks for reading!

✨ How it works

  • Users can edit an input file
    • Expected fields: product code, product info, price, currency
  • The INPUT file is loaded via the CLI
  • Database and tables are automatically created
  • Charts are updated accordingly using a simple API and Vanilla JS

Using Docker or manual setup, in less then 1 minute our information saved in the CVS file should be parsed and injected in charts.

✨ Input file Processing

The product comes with two options regarding the loaded information:

  • flask load_data - the command that loads the sales information using a randomized transaction date for a nice distribution over 30Days
  • flask load_random_data - this commands will randomize also the values.

✨ Compile the product

The Docker set up is probably the most convenient way to see the codebase in action

👉 Clone the Sources

$ git clone https://github.com/app-generator/boilerplate-code-flask-dashboard.git
$ cd boilerplate-code-flask-dashboard

👉 Start in Docker

$ docker-compose up --build 

Once all commands are executed, we should be able to visit the app in the browser, register new users, authenticate and visualize all metrics provided on main dashboard:

  • Total sales
  • Number of customers, Average order value
  • Timeframe information: report start_date, end_date

Flask Dashboard Boilerplate - Charts.

Sales API Interface

Flask Dashboard Boilerplate - Sales API Interface.

Other Product features

  • Improved authentication
    • Password reset
    • Optional Email confirmation on register
    • Extended User Model
  • Data Tables - paginated information management
  • API via Flast-restX
    • Public API over all items
  • Deployment
    • Docker, HEROKU

For more information, feel free to AMA in the comments section or access the product page. Thank you!


This content originally appeared on DEV Community and was authored by Sm0ke


Print Share Comment Cite Upload Translate Updates
APA

Sm0ke | Sciencx (2022-02-03T20:06:51+00:00) Showcase Your DATA – A simple way using Flask / Simple API / Docker and SQLite. Retrieved from https://www.scien.cx/2022/02/03/showcase-your-data-a-simple-way-using-flask-simple-api-docker-and-sqlite/

MLA
" » Showcase Your DATA – A simple way using Flask / Simple API / Docker and SQLite." Sm0ke | Sciencx - Thursday February 3, 2022, https://www.scien.cx/2022/02/03/showcase-your-data-a-simple-way-using-flask-simple-api-docker-and-sqlite/
HARVARD
Sm0ke | Sciencx Thursday February 3, 2022 » Showcase Your DATA – A simple way using Flask / Simple API / Docker and SQLite., viewed ,<https://www.scien.cx/2022/02/03/showcase-your-data-a-simple-way-using-flask-simple-api-docker-and-sqlite/>
VANCOUVER
Sm0ke | Sciencx - » Showcase Your DATA – A simple way using Flask / Simple API / Docker and SQLite. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/02/03/showcase-your-data-a-simple-way-using-flask-simple-api-docker-and-sqlite/
CHICAGO
" » Showcase Your DATA – A simple way using Flask / Simple API / Docker and SQLite." Sm0ke | Sciencx - Accessed . https://www.scien.cx/2022/02/03/showcase-your-data-a-simple-way-using-flask-simple-api-docker-and-sqlite/
IEEE
" » Showcase Your DATA – A simple way using Flask / Simple API / Docker and SQLite." Sm0ke | Sciencx [Online]. Available: https://www.scien.cx/2022/02/03/showcase-your-data-a-simple-way-using-flask-simple-api-docker-and-sqlite/. [Accessed: ]
rf:citation
» Showcase Your DATA – A simple way using Flask / Simple API / Docker and SQLite | Sm0ke | Sciencx | https://www.scien.cx/2022/02/03/showcase-your-data-a-simple-way-using-flask-simple-api-docker-and-sqlite/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.