Examples for use in tutoring a python class.
Demonstrates code and topics from:
- Flask
- MySQL (or MariaDB)
- SQLite
- Extract SQL and export to:
- CSV
- JSON
Install required Python packages
- In your terminal, change path (
cd
) to this project's directory - Run
pip install -r requirements.txt
If `pip` doesn't work, try `pip3`
Some red warnings may appear. Ignore these, unless you experience errors when running scripts.
cd
to this project's directory- Run
python server.py
- Some platforms may use `python3` instead
The web server is now available on [http://localhost:5000/](http://localhost:5000/) in the browser of your choice.
- Run
- Run
jupyter notebook
from a folder containing a Jupyter notebook. - Visit http://localhost:8888/
- Select an environment, use the "
Python: Select Interpreter
" command from the Command Palette (Ctrl+Shift+P) - Create a Jupyter Notebook by running the "
Python: Create Blank New Jupyter Notebook
" command from the Command Palette (Ctrl+Shift+P) or create a new .ipynb file in your workspace.
This project does not implement all security best practices. Take necessary precautions according to your environment when deploying applications in production.
- HTTPS
- SQL Injection
- XSS
[Flask Docs - Security](https://flask.palletsprojects.com/en/1.1.x/security/)
Sphinx is used for generating documentation.
To build docs:
`shell
cd docs
make html
`