0% found this document useful (0 votes)
138 views

Summer Training Project in Python Programming

This document is a project report submitted as part of a summer training program in Python programming. It provides an introduction to Python including what Python is, its features and syntax. It also discusses key Python concepts like data types, variables, strings and examples of code. The report was submitted by Tanvi Bansal to fulfill the requirements of a Bachelor of Technology degree in Computer Science and Engineering.

Uploaded by

Tanvi Bansal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
138 views

Summer Training Project in Python Programming

This document is a project report submitted as part of a summer training program in Python programming. It provides an introduction to Python including what Python is, its features and syntax. It also discusses key Python concepts like data types, variables, strings and examples of code. The report was submitted by Tanvi Bansal to fulfill the requirements of a Bachelor of Technology degree in Computer Science and Engineering.

Uploaded by

Tanvi Bansal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 34

Summer Training Project

In
Python Programming

Project Report
submitted in partial fulfilment of the requirements for the
award of the degree of

BACHELOR OF TECHNOLOGY
(COMPUTER SCIENCE AND ENGINEERING)

Undertaken at:
itmtb Technologies

In their Learning with Prospareto Program

Submitted By:
Tanvi Bansal
Roll No.- 11901161
Regd No. 7141-2019-0261

JULY – AUGUST 2021


1
(SUMMER TRAINING IN PYTHON PROGRAMMING)

Table of Contents

SR No. DESCRIPTION PAGE No.


1 Preface 3
2 Acknowledgement 4
3 Declaration 5
4 Training Completion 6
Letter
5 Company Profile 7
6 Introduction to Python 8
Programming
7 Introduction to Project 24
8 Code of the Project 28
9 Short Project for 33
Practice
10 Biblography 34

2
PREFACE

This work has been done as a part of industrial training. The purpose of industrial
training is to familiarize the students with the present working environment in country
and outside.

To provide the students with the opportunity to study the latest technical trends those
have been established as well as one that what they are learning during the period of
industrial training will certainly help them to develop their potential and technical
skills. The report has been explained with the help of diagrams and figures. The
running project has presented through a CD representation. The subject matter has been
compiled in a simple, illustrative and lucid manner.

My Project is on “CUSTOMER PRIVACY MANAGEMENT” which is based on


python programming language.

Through this project I have learned so many skills and techniques about python and
how I could use it in making other applications.

3
ACKNOWLEDGEMENT

It is my proud privilege and duty to acknowledge the kind of help and guidance received
from several people in preparation of this report. It would not have been possible to prepare
this report in this form without their valuable help, cooperation and guidance.

First and foremost, I wish to record our sincere gratitude to Mr. Aakash Ahuja
founder and CEO of Prospareto and our tutor for the training for their constant
support and encouragement in preparation of this report and for making available
videos and interface facilities needed to prepare this report.

The seminar on “Python” was very helpful to us in giving the necessary background
information and inspiration in choosing this topic for the seminar. Their contributions
and technical support in preparing this report are greatly acknowledged.

Last but not the least, we wish to thank our parents for financing our studies in this
college as well as for constantly encouraging us to learn engineering. Their personal
sacrifice in providing this opportunity to learn engineering is gratefully acknowledge.

TANVI BANSAL
(11901161)

4
DECLARATION

I, Tanvi Bansal , hereby affirm that the project report titled “Summer Training in Python
Programming”, submitted to Punjabi University, Patiala in partial fulfilment of the
requirements for the award of degree of B.Tech. (Computer Science and Engineering) is an
authentic record of my own work and that to the best of my knowledge and belief, it contains
no written material which has been accepted for the qualification of any other degree or
diploma of a university or other institution of higher learning except where due acknowledge
is made.

Signature of student: _____________


Name of student: Tanvi Bansal
Roll No.: 11901161
Regd. No.: 7141-2019-0261

5
TRAINING COMPLETION LETTER

6
COMPANY PROFILE

ABOUT “itmtb. TECHNOLOGIES”

itmtb – Ideas That Make Things Better – stands true to its name because here they are
passionate about technology, using it to solve all the problems and make things better. Every
unsatisfactory experience leaves us wondering if they can improve it using technology,
perhaps do it differently, if it will make a good difference to people’s lives. If the answer is
yes, they don’t stop until it’s completed.

Digitisation is the core of their approach. There products are powered by cutting edge
Artificially Intelligent engines.

Prospareto (www.prospareto.com), there flagship product , aims to


help retail customers find verified, reliable capital markets experts in
an easy way. Prospareto aims to dissolve all the trust and knowledge
barriers that so far prevented anyone with not-a-lot-of-money to
participate in markets.
LEARNING WITH PROSPARETO
Learning with Prospareto is a learning program started by prospareto founder and CEO Mr.
Aakash Ahuja . The aim was to enhance the skills of the new developers in programming.

7
INTRODUCTION TO PYTHON PROGRAMMING
(with codes done for practice as examples)

#What is Python?

Python is a high-level, interpreted, interactive and object-oriented scripting language.


Python is designed to be highly readable. It uses English keywords frequently where as
other languages use punctuation, and it has fewer syntactical constructions than other
languages.

 Python is Interpreted: Python is processed at runtime by the interpreter.


You do not need to compile your program before executing it. This is
similar to PERL and PHP.

 Python is Interactive: You can actually sit at a Python prompt and interact
with the interpreter directly to write your programs.

 Python is Object-Oriented: Python supports Object-Oriented style or


technique of programming that encapsulates code within objects.

 Python is a Beginner's Language: Python is a great language for the


beginner-level programmers and supports the development of a wide range of
applications from simple text processing to WWW browsers to games.

#Python Features :

Python provides lots of features that are listed below :

1) Easy to Learn and Use

Python is easy to learn and use. It is developer-friendly and high level programming
language.

8
2) Expressive Language

Python language is more expressive means that it is more understandable and readable.

3) Interpreted Language

Python is an interpreted language i.e. interpreter executes the code line by line at a
time. This makes debugging easy and thus suitable for beginners.

4) Cross-platform Language

Python can run equally on different platforms such as Windows, Linux, Unix
and Macintosh etc. So, we can say that Python is a portable language.

5) Free and Open Source

Python language is freely available at official web address. The source- code is also
available. Therefore it is open source.

6) Object-Oriented Language

Python supports object oriented language and concepts of classes and objects come
into existence.

7) Extensible

It implies that other languages such as C/C++ can be used to compile the code and
thus it can be used further in our python code.

8) Large Standard Library

Python has a large and broad library and provides rich set of module and functions
for rapid application development.

9) GUI Programming Support

Graphical user interfaces can be developed using Python.

10) Integrated

9
 It can be easily integrated with languages like C, C++, JAVA etc.

 Apart from the above-mentioned features, Python has a big list of good
features, few are listed below:

 It supports functional and structured programming methods as well as OOP.

 It can be used as a scripting language or can be compiled to byte-code


for building large applications.

 It provides very high-level dynamic data types and supports dynamic


type checking.

 It supports automatic garbage collection.

 It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java.

#Python Syntax

Python syntax can be executed by writing directly in the Command Line:

>>> print (“Hello World”)

Hello world

10
#Datatypes
Built-in Data Types

In programming, data type is an important concept.

Variables can store data of different types, and different types can do different things.

Python has the following data types built-in by default, in these categories:

Text Type: Str

Numeric Types: int, float, complex

Sequence Types: list, tuple, range

Mapping Type: dict

Set Types: set, frozenset

Boolean Type: bool

Binary Types: bytes, bytearray, memoryview

11
#Variables

Variables are containers for storing data values.

#Strings

Strings in python are surrounded by either single quotation marks, or double quotation marks.

'hello' is the same as "hello"

Like many other popular programming languages, strings in Python are arrays of bytes
representing unicode characters.

However, Python does not have a character data type, a single character is simply a string
with a length of 1.

Square brackets can be used to access elements of the string.

#Boolean

You can evaluate any expression in Python, and get one of two
answers, True or False.

12
Strings Attributes

13
14
#Operators

Operators are used to perform operations on variables and values.

Python divides the operators in the following groups:

 Arithmetic operators

15
 Relational Operators

16
 Logical Operators

17
#List

Lists are used to store multiple items in a single variable.

Lists are one of 4 built-in data types in Python used to store collections of data, the other 3
are Tuple, Set, and Dictionary, all with different qualities and usage.

Lists are created using square brackets

18
#Tuples
19
Tuples are used to store multiple items in a single variable.

Tuple is one of 4 built-in data types in Python used to store collections of data, the other 3
are List, Set, and Dictionary, all with different qualities and usage.

A tuple is a collection which is ordered and unchangeable.

Tuples are written with round brackets.

20
21
#Sets

Sets are used to store multiple items in a single variable.

Set is one of 4 built-in data types in Python used to store collections of data, the other 3
are List, Tuple, and Dictionary, all with different qualities and usage.

A set is a collection which is unordered, unchangeable, and unindexed.

Sets are written with curly brackets.

myset = {"apple", "banana", "cherry"}

#Dictionaries

Dictionaries are used to store data values in key:value pairs.

A dictionary is a collection which is ordered*, changeable and does not allow duplicates.

22
#Functions

A function is a block of code which only runs when it is called.

You can pass data, known as parameters, into a function.

A function can return data as a result.

#Classes/Objects

Python is an object oriented programming language.

Almost everything in Python is an object, with its properties and methods.

A Class is like an object constructor, or a "blueprint" for creating objects

23
INTRODUCTION TO THE PROJECT
Customer Management System ->

On any site when we sign up they ask we want to subscribe for their information on our
email id or updates. Newsletter is very simple things for us whenever we sign up for any site
we start getting updates, newsletters from them. But in certain countries and continents
specially Europe it can be a big deal .

Procter and Gamble which works in more than 180 countries had a lot of challenges back in
2016 and 2017 in Europe and US. GDPR General Data Production Rules which is the
regulation started by American and European government to protect the privacy of the
customer. According to this rule if you get any spam calls you can easily case on them of 1-2
million dollars and also more chances to win . Data Privacy is so strict in these countries.

So, here Procter and Gamble who deals with so many people for them data privacy and
management becomes more problematic.

When this GDPR regulation government gave the time of 8 months to the companies to
change their systems for proper management of customer data.

GDPR consist of many rules , one of them was if a person asks you what data you have of
him than you have to tell it including their history data.

The problem this regulation creates for Procter and Gamble was, the customer management
system of Procter and Gamble that relie on couple of things. Like classifying the customer
properly , when a customer subscribes than sending the information and updates on a same
medium they asked for and these all were a simple part . Challenges came when customer opt
out from the subscription. One day when he ask that he doesn’t want that information
anymore. Now, Procter and Gamble on a daily basis used to run around 2700 campaign.
These would be phone campaign , email campaigns or digital campaigns etc. If you have opt
out from phone campaigns it was the rule of government that within 10 days P&G have to fix
their systems so that from 11th day the customer should not receive that particular
information on that medium. Its sound easy but its not. After GDPR is launched company
was in situation twice where a customer of 20 million dollars just because he received one
extra email. When customer saw that government has come up with such rules some were
happy and some started taking disadvantage of it and started filing cases and taking money
from companies whenever the receive a extra mail or so my mistake. So it was a big issue.

So managing the entire thing it took the team of 21 people to handle its customer
management system . As it was so necessary to build a strong system as it was not easy at all
when we talk about such a big company like Procter and Gamble more than 180 countries,
millions and billions of customers and if government fine you than your legal fees,
reputation, brand value like issues our also main headache.

So, here we are trying to simulate that system that is Customer Management System.

24
Features :

• Fast Response Speed

• Access through web services.

• Customer log in.

• New customer id is created. Install be unique.

• Customer’s log in defaults to certain topics subscriptions.

• Customer’s can opt for certain subscriptions for different mediums.

Requirements:

Access through web services.


Customer logs in.

TASK:
New customer id is created. It shall be unique.
Customer's login defaults to certain topics subscriptions.

INPUT FORMAT:
inp={
"f_nm":"Iron",
    "l_nm":"Man",
    "dob":"",
    "g":"m",
    "eml":"[email protected]",
    "img":"",
    "ph":"1765490324",
    "al1":"",
    "al2":"",
    "al3":"",
    "tg":"67682983789"
}

OUTPUT FORMAT:

If there are no errors.


out={
    "data":{
        "idc":7649724562736
        },
    "error":[]
}

25
If there are errors.
out={
    "data":{},
    "error":[200, “Invalid address”]
}

SUBTASKS:
Accept incoming data
Check if customer has accessed before using their email address
If yes, then return their customer id
If not, then
generate a new, unique customer id
store customer information the database
store email information in the database
store phone information in the database
store address information in the database
Return newly generated customer id
Convert code to user modular components

DESIGN/PROCESS FLOW:
User logs in to the front end - sends a json to the server
Login function is executed on the server
Return is made after processing

FUNCTIONS NEEDED:
generate a new, unique customer id
Do login checks/processing
Laterly,

Integrate logging and auditing. Integrate generic error handling

Customers can opt for certain subscriptions for different mediums.


Allow customers to change their subscription details.
Customer wants to fetch their subscribed items list

What I learnt from the project

 System architecture
 Python programming as required in commercial applications
 Securing python code
 Making Python code that performs within SLAs (Service Level Agreements of
code - an agreement between customer and solution developer guaranteeing a
minimum level of performance)
 Writing code that scales with increasing workload
 Integrating with database
 Building secure APIs in Python

26
Platform to be used for build

AWS 

Is built on the same lines as the Prospareto production cloud setup. And I am provided
with the access of it.

Used:
 RDS for MySQL
 EC2 for Linux compute nodes
 Gunicorn for web server

Architecture to be created

MySQL backend
Database access control through MySQL/Data access controlled from Python
Main Python classes serving API requests
Common modules
API Security layer designed in Python
Endpoint layer
Gunicorn web server for handling requests

Processes

Requirement gathering
High level design
Low level design
Development
Unit testing
Integration testing
Deployment
Early Life Support (ELS)
Close

Involves

History processing
Logging/Auditing
Error handling/not sending real error to user
Surrogate key generator

27
CODE OF THE PROJECT

28
29
30
31
RESULT

32
SHORT PROJECT FOR PRACTICE

33
BIBLOGRAPHY
The following sites are used to fulfil the requirements of proposed project and are helpful in
understanding, development and the maintenance of the project

. 1. https://www.tutorialspoint.com/python/index.htm

2. https://www.javatpoint.com/python-tutorial

3. Recorded videos of the training.

4. Presentation and Notes provided by the tutor.

34

You might also like