https://github.com/dyslab/flask-site-demo
Python Flask framework learning.
https://github.com/dyslab/flask-site-demo
demo flask python3 template website
Last synced: about 2 months ago
JSON representation
Python Flask framework learning.
- Host: GitHub
- URL: https://github.com/dyslab/flask-site-demo
- Owner: dyslab
- License: mit
- Created: 2019-02-23T15:14:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-06T15:43:57.000Z (about 2 years ago)
- Last Synced: 2025-04-05T05:45:42.737Z (about 1 year ago)
- Topics: demo, flask, python3, template, website
- Language: Python
- Homepage:
- Size: 8 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## flask-site-demo: A website demo powered by Python Flask framework.
[](https://flask.palletsprojects.com/) [](https://github.com/dyslab/flask-site-demo/blob/master/LICENSE) [](https://github.com/dyslab/flask-site-demo)
### OS and tools information
- OS: Ubuntu v18. ~ v19 / Deepin v20 ~ v23 / Windows 11
- Python version (virtual environment): v3.6.7 or above.
- Framework: Flask v1.1.1 ~ v3.1.2
- SQL toolkit: SQLAlchemy v1.3.11
- IDE tool: Visual Studio Code
***
### Tips before first try
1. Install Python virtual environment (venv mode)
```bash
python3 -m venv venv
```
2. Activate venv mode
```bash
source venv/bin/activate
# or
. venv/bin/activate
# or (on Windows)
venv\Scripts\activate
```
3. Deactivate venv mode
```bash
deactivate
```
4. Update or install latest pip (in venv mode)
```bash
pip install pip -U
# or curl it by yourself
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py # Download installation script.
sudo python get-pip.py # Run script.
```
5. Install required packages
```bash
pip install -r requirements.txt
```
6. Start web server
```bash
# Acticate Python virtual mode
source venv/bin/activate
# Run web server on any platform (development mode)
flask --app 'fsdemo' run
# NOTE: The argument '--app' is a new feature in Flask v3
# Or run the below script on Linux
# Classical approach to running web service in Flask v1
./webstart
# Note: type command line `chmod a+x ./webstart` to make the script executable if it does'n work
# Then, ckeck out link: http://127.0.0.1:5000/ on browser.
```
### Additional notes
- All reqired packages list see [requirements.txt](requirements.txt)
- Export all required packages list with restrict version to requirements.txt by the command line below.
```bash
pip freeze > requirements.txt
```
---
- *Last Modified on 27 October 2025*
- *Created on 28 February 2019*