23 lines
1.3 KiB
Plaintext
23 lines
1.3 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:
|
|
- fix up lame book linkages to tabels that are so not 3nf, *_LST tables, etc.
|
|
- use flask-wtf and flask-bootstrap, see this: https://medium.com/better-programming/how-to-use-flask-wtforms-faab71d5a034 for author/<id>
|
|
- consider getting rest of Book class connected, e.g. series, loan, etc.
|
|
- see if we can break this out of main.py -- can't recall what was circular about this, but at least the wtf bits seem to be able to be moved out, so why not do that
|