documentation
documentation
documentation
INTRODUCTION
By digitizing the stock management process, this system will enhance accuracy,
reduce human errors, and streamline operations.
The project will incorporate features such as real-time stock updates, automated
alerts for low inventory levels, and detailed reporting to provide comprehensive
insights into stock status.
Objective
Scope
4. SOFTWARE DESCRIPTION
4.1 PYTHON:
Python is an open-source (free) programming language that
is used in web programming, data science, artificial
intelligence, and many scientific applications. Learning
python allows the programmer to focus on solving problems,
rather than focusing on syntax. Its relative size and
simplified syntax give it an edge over languages like java and
c++, yet the abundance of libraries gives it the power needed
to accomplish great things.
FUNCTIONS:
Defining a Function:
You can define functions to provide the required
functionality. Here are simple rules to define a function in
Python.
Function blocks begin with the keyword def followed by the
function name and parentheses ( ).
Any input parameters or arguments should be placed within
these parentheses. You can also define parameters inside
these parentheses.
The first statement of a function can be an optional
statement - the documentation string of the function or
docstring.
The code block within every function starts with a colon (:)
and is indented.
The statement return [expression] exits a function,
optionally passing back an expression to the caller. A return
statement with no arguments is the same as return None.
Syntax:
def functionname( parameters ):
"function_docstring"
function_suite
return [expression]
PYTHON-MYSQL CONNECTIVITY:
While working with Python we need to work with databases,
they may be of different types like MySQL, SQLite, NoSQL, etc.
In this article, we will be looking forward to how to connect
MySQL databases using MySQL Connector/Python. MySQL
Connector module of Python is used to connect MySQL
databases with the Python programs, it does that using the
Python Database API Specification v2.0 (PEP 249). It uses the
Python standard library and has no dependencies
Development:
This stage is the one where the quality check takes place. The
developed software is assessed to ensure that all the
specified requirements are met.
• Write the test condition and perform the testing of the
system.
• This stage is used to validate whether the application
addresses all User Requirements, technical performance.
• This is performed by the testing team, and the focus is to
find the defects.
• During test case execution, all the error found which are
reported in the test management tool and the decision of
considering the defect as Valid or Invalid depends on
developers.
• Each defect that is found will have to go through the Defect
Life Cycle in the defect management tool.
• Again, the testing approach that the project choose
depends on various factors: the complexity of the project,
the team’s capability, time, etc.
Deployment or Implementation:
def search_by_menu():
ph=input("\nenter the manufacturer name to search:")
sql="select name from stock where manuf='{}'".format(ph)
mycur.execute(sql)
rec=mycur.fetchall()
if rec==None:
print(ph,"IS A WRONG MANUFACTURER")
else:
print("......MEDICINES MANUFACTURED BY",ph,".....")
for nm in rec:
print(nm[0])
def cost_update():
def sell():
def available():
ph=input("\nenter the medicine name to search:")
sql="select balance from stock where name='{}'".format(ph)
mycur.execute(sql)
rec=mycur.fetchone()
if rec==None:
print(ph,"is not avaialable")
else:
print(rec[0],"units of",ph," is available")
def dispose():
def close():
print("\n🤝🤝 நன்றி வணக்கம் 🤝🤝 ")
mycon.close()
quit()
while True:
print("\nwelcome to our medical shop stocking system")
choice=int(input("\nENTER UR CHOICE:"))
if choice==1:
store()
elif choice==2:
search_by_name()
elif choice==3:
search_by_menu()
elif choice==4:
cost_update()
elif choice==5:
sell()
elif choice==6:
available()
elif choice==7:
dispose()
else:
close()
output:
7. USER MANUAL
7.1 Python installation
Step 1 − Select Version of Python to Install
Python has various versions available with differences
between the syntax and working of different versions of the
language. We need to choose the version which we want to use
or need. There are different versions of Python 2 and Python 3
available.
Step 2 − Download Python Executable Installer
On the web browser, in the official site of python
(www.python.org), move to the Download for Windows section.
All the available versions of Python will be listed.
Select the version required by you and click on
Download. Let suppose, we chose the Python 3.9.1 version.
[root@host]# mysql
Post-installation Steps
MySQL ships with a blank password for the root
MySQL user. As soon as you have successfully installed the
database and the client, you need to set a root password as
given in the following code block −
If you want to run the MySQL server at boot time, then make
sure you have the following entry in the /etc/rc.local file.
/etc/init.d/mysqld start
Also, you should have the mysqld binary in the /etc/init.d/
directory.
Database connectivity
Database connectivity refers to connection and
communication between an application and a database
system.
The term “front-end” refers to the user interface,
while “back-end” means the server application and database
that work behind the scenes to deliver information to the
user. mysql.connector-Library or package to connect
from python to MySQL.
Syntax:
<Connection object>=mysql.connectorconnect
(host=<hostname>, user=<username>, passwd <password>,
database=<dbname>) import mysql.connector
con=mysql.connector.connect(host=”localhost”, user=”root”,
passwd=” “)
Eg: Cursor=con.cursor()
Syntax:
<cursor object>.execute(SQL QUERY)
Eg: cursor.execute(“select* from data”). The above code will
execute the sql query and store the retrieved records
(resultset) in the cursor object(cursor).
9. BIBLIOGRAPHY
BOOF REFERENCES:
>https://pythonworld.in/practical-project/project-list/
>http://python.mykvs.in/uploads/showpapers/testproject.
php
>https://www.cs4school.com/cbse/python-project-forclass-
12