https://github.com/gsaini/python-flask-getting-started
Flask is a lightweight, flexible, and popular Python microframework for building web applications, known for its simplicity and ease of use, allowing developers to focus on application logic rather than infrastructure.
https://github.com/gsaini/python-flask-getting-started
browser-web-api flask html5 javascript postgresql python server-sent-events
Last synced: 23 days ago
JSON representation
Flask is a lightweight, flexible, and popular Python microframework for building web applications, known for its simplicity and ease of use, allowing developers to focus on application logic rather than infrastructure.
- Host: GitHub
- URL: https://github.com/gsaini/python-flask-getting-started
- Owner: gsaini
- Created: 2025-04-06T17:12:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-24T00:20:49.000Z (about 1 year ago)
- Last Synced: 2026-06-14T23:34:32.132Z (23 days ago)
- Topics: browser-web-api, flask, html5, javascript, postgresql, python, server-sent-events
- Language: Python
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# python-flask-getting-started
[](https://codecov.io/gh/gsaini/python-flask-getting-started)






[Flask](https://flask.palletsprojects.com/en/stable/) is a lightweight, flexible, and popular Python microframework for building web applications, known for its simplicity and ease of use, allowing developers to focus on application logic rather than infrastructure.
## PostgreSQL: The World's Most Advanced Open Source Relational Database
PostgreSQL is a powerful, open source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.
## Server-Sent Events (SSE)
Server-Sent Events (SSE) provide a simple way to push updates from a server to a browser (client) over HTTP. SSE is unidirectional, meaning data flows only from the server to the client, and it is natively supported in browsers via the `EventSource` API.
### Use Cases for SSE
SSE is ideal for scenarios such as:
- Live notifications
- Stock price updates
- News feeds
- Chat messages (read-only streams)
### 📦 Key Characteristics of SSE
| **Feature** | **Description** |
|----------------------|-------------------------------------|
| **Protocol** | HTTP (not WebSocket) |
| **Direction** | Server → Client |
| **Reconnect Support**| Built-in automatic reconnects |
| **Format** | Text-based (`text/event-stream`) |
| **Browser API** | `EventSource` |
## Generate a Self-Signed SSL Certificate
Run the following in terminal (Python must be installed):
```
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes
```
## How to Run
Run the Flask server:
```
python server.py
```