Github Link: https://github.com/piyush0406/MyMedicine
This repository is an attempt to create a mini world of “MyMedicine - An Online Pharmacy Management System”. It is a system that stores data and enables functionality that allows users to buy medicines via an online network. To be precise, pharmacy management system is an internet-based vendor that sells medicines and allows users an option to buy from their mobile, laptop etc.
The CLI version for the same can be run by cloning this repo.
- Python3
$ sudo apt-get update
$ sudo apt-get install python3.6- MySQL
- PyMySQL
$ sudo apt-get install python3-pip
$ pip3 install pymysqlYou will need to replicate the MyMedicine Databse on your local machine, for which the dump.sql file is provided herewith.
Go to your MySQL CLI and create a database using the following command:
$ create database MYMEDICINE;Run the following command to import the database:
$ mysql -u username -p MYMEDICINE < dump.sqlYou will need to enter your MySQL password in the next step.
To run the CLI, change your directory to the cloned folder and run the following command:
$ python3 MyMedicine.py- Please Note: If you are using Docker to run MySQL, you might need to first change your port to 5005 (or the port you use) by replacing the following lines for connecting the database in the MyMedicine.py file: con = pymysql.connect(host='localhost',
user=username,
password=password,
db='MYMEDICINE',
port='5005',
cursorclass=pymysql.cursors.DictCursor)near lines 1086-1090.
You will be first prompted to enter your MySQL Username and Password as follows:
Enter username and password to access the database.
Username:
Password:You will now be redirected to the Login/Signup Page.
The following are some sample credentials for you to login (although you can create yours too from the CLI):
- Admin
Email-Id: prajneya@admin.com
Password: 1234- Customer
Email-Id: prajneya@customer.com
Password: 1234- Manager
Email-Id: prajneya1@manager.com
Password: 1234Email-Id: prajneya2@manager.com
Password: 1234Email-Id: prajneya3@manager.com
Password: 1234Happy Shopping!