This repository hosts the Inside Books Project database web interface. This interface is implemented using Flask and SQLAlchemy and includes the following features:
- printing processing labels through the Dymo JS framework,
- querying inmate data from the TDCJ and FBOP websites,
- printing warnings and alerts for inmates,
- printing shipment and request metrics,
- logging in through Google your google account.
Installing and running this software requires several steps. First, you must clone this repository with submodules. Then, the Python and HTML/CSS/JS dependencies must be installed. Finally, you must configure the application and initialize the database.
To clone this repository with submodules included, run the following:
git clone --recurse-submodules https://github.com/jonkensta/ibp.git
All of the Python dependencies must be installed as given in the requirements file. It is recommended that these be installed in a virtual environment.
pip install -r requirements.txtThe above command requires that the python package manager pip is installed.
Next, from the root directory, install the static HTML/CSS/JS dependencies as follows:
cd ibp/static
npm installThe above command requires that the javascript package manager npm is installed.
Next, you will need to set the configuration for your development or production configuration files.
To do this, set both the secret_key and apikey variables in the [server] section to distinct passwords that you keep secret.
Then, go to the Google Developer's Console and create development or production credentials.
The resulting IDs and keys need to be stored in the ID and secret variables in the [google] section.
Finally, you will need to initialize the database and create an authorized user. This is done using Python as follows:
import ibp
ibp.db.create_all()
user = ibp.models.User(email='your_email@your_email.com', authorized=True)
ibp.db.session.add(user)
ibp.db.session.commit()After going through each of the installation steps, you can run the server in development mode on your local machine by doing the following:
FLASK_ENV=development python run.pyBy default, this will load the interface on localhost port 8000.
Coming soon ...