Clone the repository
# ssh
git clone git@github.com:jamesesguerra/csci112-finalproj.git
# or
# https
git clone https://github.com/jamesesguerra/csci112-finalproj.git
Change directory into folder
cd csci112-finalproj
Make a virtual environment
python -m venv venv
Activate the environment
# windows
\venv\Scripts\activate
# unix
source venv/bin/activate
Install project dependencies
pip install -r requirements.txt
- To use the database associated with the project, add "HospitalAdministration" as a path parameter in the MongoDB URI used to connect to the MongoDB Atlas cluster:
mongodb+srv://mongo:mongo@csci112-cluster.zbudtoj.mongodb.net/HospitalAdministration?retryWrites=true&w=majority
- Import the
MongoClient
class from the pymongo package. The MongoDB URI must then be passed to it when creating an instance of the client:
from pymongo import MongoClient
client = MongoClient("mongodb+srv://mongo:mongo@csci112-cluster.zbudtoj.mongodb.net/HospitalAdministration?retryWrites=true&w=majority")
- Access the
HospitalAdministration
database from the client object:
db = client["HospitalAdministration"]