Professional Documents
Culture Documents
Python Developer
By
OJAL PUNDHIR
[PIET20CS128]
CERTIFICATE
This is to certify that Third Year Industrial Training Seminar Report entitled Python Developer has been
submitted by OJAL PUNDHIR (PIET20CS128) for partial fulfillment of the Degree of Bachelor of
Technology of Rajasthan Technical University. It is found satisfactory and approved for submission
Date: 10/10/2022
ii
Certificate Issued By Grras Solutions
iii
DECLARATION
I hereby declare that the Industrial Training Seminar report entitled Python Developer was
carried out and written by me under the guidance of Ms. RITU SHUKLA and MR. VIVEK
SAXENA Assistant Professor, Department of Computer Science and Engineering, Poornima
Institute of Engineering & Technology, Jaipur. This work has not been previously formed the
basis for the award of any degree or diploma or certificate nor has been submitted elsewhere for
the award of any degree or diploma.
iv
ACKNOWLEDGEMENT
A project of such a vast coverage cannot be realized without help from numerous sources and
people in the organization. I am thankful to Dr. Dinesh Goyal, Director, PIET for providing me
a platform to carry out such a training successfully.
I am also very grateful to Dr. Deepak Moud (HOD, CS) for his kind support.
I would like to take this opportunity to show my gratitude Ms. RITU SHUKLA and MR.
VIVEK SAXENA who helped me in successful completion of my third Year Industrial Training.
They have guided, motivated & were source of inspiration for me to carry out the necessary
proceedings for the training to be completed successfully. I am also grateful to the Dr. Anil
Kumar for his guidance and support.
I am thankful to Mr. Ravi Ramwat for his kind support and providing me expertise of the
domain to develop the project. I would also like to express my hearts felt appreciation to all of
my friends whose direct or indirect suggestions help me to develop this project [and to entire
team members for their valuable suggestions. Lastly, thanks to all faculty members of Computer
Science department for their moral support and guidance.
Submitted By:
OJAL PUNDHIR
v
ABSTRACT
College Management System gives us an edge to manage our college services include fee
Management and canteen orders. College Management will help to student to give their order
online as well as manage bills in their account.
The website always ask for id and password then all the resources are accessible to it. The
Technology usually used in making is basic frontend using HTML,CSS, JavaScript.
Then frames and backend code is done through Flask and Python . Database used is Sqllite.
Keywords:
HTML,CSS,JavaScript,Python,Flask
vi
Tables Of Contents
vii
List of Figures
viii
Python Developer ITS Report
Chapter 1
Introduction
1.1 Introduction to Python
Python is a widely used general-purpose, high level programming language. It was created
by Guido van Rossum in 1991 and further developed by the Python Software Foundation. It
was designed with an emphasis on code readability, and its syntax allows programmers to
express their concepts in fewer lines of code.
Python is a programming language that lets you work quickly and integrate systems
more efficiently.
There are two major Python versions: Python 2 and Python 3. Both are quite different.
Reason for increasing popularity
Emphasis on code readability, shorter codes, ease of writing .Programmers can express
logical concepts in fewer lines of code in comparison to languages such as C++ or Java.
Python supports multiple programming paradigms, like object-oriented, imperative and
functional programming or procedural.There exists inbuilt functions for almost all of the
frequently used concepts. Philosophy is “Simplicity is the best”.
LANGUAGE FEATURES
Interpreted
There are no separate compilation and execution steps like C and C++.
Directly run the program from the source code.
Internally, Python converts the source code into an intermediate form called
bytecodes which is then translated into native language of specific computer to run
it.
No need to worry about linking and loading with libraries, etc.
Platform Independent
1
Python Developer ITS Report
Simple
Embeddable
Python can be used within C/C++ program to give scripting capabilities for
the program’s users.
Robust:
2
Python Developer ITS Report
Numeric
Sequence Type
Boolean
Set
Dictionary
3
Python Developer ITS Report
Numeric
In Python, numeric data type represent the data which has numeric value. Numeric value
can be integer, floating number or even complex numbers. These values are defined as
int, float and complex class in Python
Sequence
In Python, sequence is the ordered collection of similar or different data types. Sequences
allows to store multiple values in an organized and efficient fashion. There are several
sequence types in Python –
String
List
Tuple
1) String
In Python, Strings are arrays of bytes representing Unicode characters. A string is a
collection of one or more characters put in a single quote, double-quote or triple quote. In
python there is no character data type, a character is a string of length one. It is
represented by str class.
2) List
Lists are just like the arrays, declared in other languages which is a ordered collection of
data. It is very flexible as the items in a list do not need to be of the same type.
3) Tuple
Just like list, tuple is also an ordered collection of Python objects. The only difference
between tuple and list is that tuples are immutable i.e. tuples cannot be modified after it is
created. It is represented by tuple class.
Boolean
4
Python Developer ITS Report
Data type with one of the two built-in values, True or False. Boolean objects that are
equal to True are truthy (true), and those equal to False are falsy (false). But non-Boolean
objects can be evaluated in Boolean context as well and determined to be true or false. It
is denoted by the class bool.
Set
In Python, Set is an unordered collection of data type that is iterable, mutable and has no
duplicate elements. The order of elements in a set is undefined though it may consist of various
elements.
Dictionary
Dictionary in Python is an unordered collection of data values, used to store data values
like a map, which unlike other Data Types that hold only single value as an element,
Dictionary holds key:value pair. Key-value is provided in the dictionary to make it more
optimized. Each key-value pair in a Dictionary is separated by a colon :, whereas each
key is separated by a ‘comma’.
Class
Objects
Polymorphism
Encapsulation
Inheritance
Data Abstraction
5
Python Developer ITS Report
Class
A class is a collection of objects. A class contains the blueprints or the prototype from which
the objects are being created. It is a logical entity that contains some attributes and methods.
To understand the need for creating a class let’s consider an example, let’s say you wanted to
track the number of dogs that may have different attributes like breed, age. If a list is used,
the first element could be the dog’s breed while the second element could represent its age.
Let’s suppose there are 100 different dogs, then how would you know which element is
supposed to be which? What if you wanted to add other properties to these dogs? This lacks
organization and it’s the exact need for classes.
6
Python Developer ITS Report
Attributes are always public and can be accessed using the dot (.) operator. Eg.:
Myclass.Myattribute
Objects
The object is an entity that has a state and behavior associated with it. It may be any real-
world object like a mouse, keyboard, chair, table, pen, etc. Integers, strings, floating-point
numbers, even arrays, and dictionaries, are all objects. More specifically, any single integer
or any single string is an object. The number 12 is an object, the string “Hello, world” is an
object, a list is an object that can hold other objects, and so on. You’ve been using objects all
along and may not even realize it.
An object consists of :
Inheritance is the capability of one class to derive or inherit the properties from another
class. The class that derives properties is called the derived class or child class and the
class from which the properties are being derived is called the base class or parent
class. The benefits of inheritance are:
It represents real-world relationships well.
It provides the reusability of a code. We don’t have to write the same code again
and again. Also, it allows us to add more features to a class without modifying it.
It is transitive in nature, which means that if class B inherits from another class A,
then all the subclasses of B would automatically inherit from class A.
Types of Inheritance –
Single Inheritance:
7
Python Developer ITS Report
Hierarchical level inheritance enables more than one derived class to inherit properties
from a parent class.
Multiple Inheritance:
Multiple level inheritance enables one derived class to inherit properties from more
than one base class.
Polymorphism
Polymorphism simply means having many forms. For example, we need to determine
if the given species of birds fly or not, using polymorphism we can do this using a
single function.
Encapsulation
Encapsulation is one of the fundamental concepts in object-oriented programming
(OOP). It describes the idea of wrapping data and the methods that work on data within
one unit. This puts restrictions on accessing variables and methods directly and can
prevent the accidental modification of data. To prevent accidental change, an object’s
variable can only be changed by an object’s method. Those types of variables are known
as private variables.
Data Abstraction
It hides the unnecessary code details from the user. Also, when we do not want to give
out sensitive parts of our code implementation and this is where data abstraction came.
Data Abstraction in Python can be achieved through creating abstract classe
8
Python Developer ITS Report
Chapter 2
Flask and SQL lite
2.1 Introduction to flask
What is Flask?
Routing:
Nowadays, the web frameworks provide routing technique so that user can remember the
URLs. It is useful to access the web page directly without navigating from the Home page.
It is done through the following route() decorator, to bind the URL to a function.
@app.route(‘/hello’)
def hello_world():
Sessions in Flask:
In Session, the data is stored on Server. It can be defined as a time interval in which the
client logs into a server until the user logs out. The data in between them are held in a
temporary folder on the Server. Each user is assigned with a specific Session ID. The Session
object is a
9
Python Developer ITS Report
dictionary that contains the key-value pair of the variables associated with the session. A
SECRET_KEY is used to store the encrypted data on the cookie.
For example:
Syntax: Flask.abort(code)
The code parameter can take the following values to handle the error accordingly:
10
Python Developer ITS Report
File-Uploading in Flask:
File Uploading in Flask is very easy. It needs an HTML form with enctype attribute and
URL handler, that fetches file and saves the object to the desired location. Files are
temporary stored on server and then on the desired location.
The HTML Syntax that handle the uploading URL is :
@app.route('/upload')
def upload_file():
return render_template('upload.html')
11
Python Developer ITS Report
The Variables in the flask is used to build a URL dynamically by adding the variable parts to
the rule parameter. This variable part is marked as. It is passed as keyword argument. See
the example below
Dynamic Building of the URL for a specific function is done using url_for() function. The
function accepts the name of the function as first argument, and one or more keyword
arguments. See this example
@app.route('/guest/<guest>')
def hello_guest(guest): #binding to hello_guest call
return 'Hello %s as Guest' % guest
@app.route('/user/<name>')
def hello_user(name):
if name =='admin': #dynamic binding of URL to function
return redirect(url_for('hello_admin'))
else:
return redirect(url_for('hello_guest', guest = name))
2.2 SQL-Lite
History:
It was designed by D. Richard Hipp for the purpose of no administration required for
operating a program. in August 2000. As it is very lightweight compared to others like
MySql and Oracle, it is called SQLite. Different versions of SQLite are released since
2000.
13
Python Developer ITS Report
Features of SQLite
The transactions follow ACID properties i.e. atomicity, consistency, isolation, and durability
even after system crashes and power failures.
The configuration process is very easy, no setup or administration needed.
All the features of SQL are implemented in it with some additional features like partial
indexes, indexes on expressions, JSON, and common table expressions.
Sometimes it is faster than the direct file system I/O.
It supports terabyte-sized databases and gigabyte-sized strings and blobs.
Almost all OS supports SQLite like Android, BSD, iOS, Linux, Mac, Solaris, VxWorks, and
Windows (Win32, WinCE, etc. It is very much easy to port to other systems.
Complete database can be stored in a single cross-platform disk file.
Applications of SQLite
Due to its small code print and efficient usage of memory, it is the popular choice for the
database engine in cellphones, PDAs, MP3 players, set-top boxes, and other electronic
gadgets.
It is used as an alternative for open to writing XML, JSON, CSV or some proprietary
format into disk files used by the application.
As it has no complication for configuration and easily stores file in an ordinary disk file, so it
can be used as a database for small to medium sized websites.
It is faster and accessible through a wide variety of third-party tools, so it has great
application in different software platforms.
Creating Table:
CREATE TABLE STUDENT(
14
Python Developer ITS Report
Insert Command:
Drop Table:
15
Python Developer ITS Report
16
Python Developer ITS Report
Chapter 3
Training Detail and Project
Python language provides several job opportunities and promises high growth with huge
salary prospects. Some of the big and renowned companies that use Python for their
development are:
17
Python Developer ITS Report
Data Science
Python is known for being robust, scalable and provides extensible visualization and
graphics options. Hence it’s widely used in Data Science. Python supports several
popular libraries. Some of them are as follows:
18
Python Developer ITS Report
19
Python Developer ITS Report
20
Python Developer ITS Report
Company Screenshot
21
Python Developer ITS Report
Chapter 4
References
References
https://grras.com/
https://www.w3schools.com/
https://www.geeksforgeeks.org/
https://www.youtube.com/watch?v=6iCHf7OZn6c&list=PL6Zs6LgrJj3tDXv8a_elC
6eT_4R5gfX4d
Programmiz.com
Javatpoint.com
Realpython.com
22