23 lines
1.1 KiB
Plaintext
23 lines
1.1 KiB
Plaintext
### TODO: get all this inside a docker container and use compose to do the whole set (pg, flask, ?)
|
|
# flask -> python web server
|
|
# sqlalchemy -> provides db-agnostic python objects of db content (and more)
|
|
# flask-sqlachemy combines/wraps this to provide a db.* set of objects based on the 'app' that flask creates
|
|
# marshmallow-sqlachemy provides a way to create a 'schema' of your class, then serialize an object to it
|
|
|
|
# install needed binaries (maybe I could have done this instead of pip below too -- when I docker this shit, sort it out?)
|
|
sudo apt install python3-psycopg2 libpq-dev
|
|
|
|
### LEARN: supposedly could use virtualenv instead of pip3 install --user?
|
|
# --user sticks python libs in ~/.local/[bin|lib|share]
|
|
pip3 install --user flask sqlalchemy flask-sqlalchemy flask-marshmallow SQLAlchemy-serializer
|
|
|
|
# run the web server by:
|
|
python3 main.py
|
|
|
|
|
|
### TODO:
|
|
- book subbook link will be next real challenge (with raw sql for now)
|
|
- then next challenge will be to make single book page an edit / save
|
|
- then its just finish this off :)
|
|
- fix up lame book linkages to tabels that are so not 3nf, *_LST tables, etc.
|