CS 4096 SP2020 Senior Design
Trello board can be found here.
- Python:
3.7 - DBMS:
PostgreSQL
- Clone this repo:
git clone https://github.com/vganesh1798/backendbois.git - Make sure you have the python 3
pipenvpackage installed - run
pipenv shellin the directory to set up pipenv and then runpipenv installto install all dependencies
- If pulling after updates, run
pipenv syncto update package list, and then runpipenv shell - If it already exists in the project's root directory, delete the
test.dbfile. - Navigate to
Examples/and runpython seed_db.pyto reinitialize the test database. - Run
./run.pyto run the webserver, or you can find any of the example scripts inExamples/. - The API can be found at
http://localhost:5000/. Use the routes inklap4/api.pyto test it out if you desire.
- There are two scripts in the project's root directory.
setup.pysets up theklap4drectory as a package, whilerun.pyruns the Flask web server. - The
Dummy DB Data/folder contains yaml files for seeding the test database. - The
Examples/folder contains a number of useful scripts to test functionality:db_query_example.pycan be used for testing queries using SQLAlchemy.ldap_connect.pytests a connection to KMNR's LDAP server.logging_test.pytests the database's software logging capabilities.seed_db.pyneeds to be run to initialize the test database.
- Finally, the
klap4package itself:- The
api/folder contains helper functions and classes for use with Flask. - The
db_entities/folder contains Python files for the different database objects.__init__.pycontains useful functions for interacting with the database.
api.pycontains all the REST API endpoints.db.pyis used to configure logging for the database.
- The