'Getting data for my financial dashboard with python
I want to calculate income of a commerce site with services'sales and also products'sales for financial dashboard with python.but I dont know how to get real data from the site.
Solution 1:[1]
If your question is that you want to get real-time data from your server(Database) to the Browser(Client), then leverage WebSockets. If you use Django on the backend, use django Channels and Redis to create WebSockets, and then connect to them using Javascript on the frontend. Refer to https://channels.readthedocs.io/en/stable/tutorial/part_1.html for a very simple practical implementation of this.
If you don't want bidirectional communication and more complexity, then you can also consider using Server-Sent Events. It is very useful when only unidirectional communication is required i.e. only one-sided communication from Server to the Browser(Client) is required. (Which is exactly what you want in this case, I think)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Hardeep Chhabra |
