0% found this document useful (0 votes)
7 views14 pages

PWP MicroProject

The document outlines a micro-project titled 'Internet Based Media Converters' completed by three students from the Computer Engineering program at Government Polytechnic, Jalgaon during the 2021-2022 academic year. The project focuses on converting XML to JSON and vice versa using Python, highlighting the use of specific libraries and methodologies. The report includes a project proposal, methodology, resources used, code implementation, and a conclusion emphasizing the practical knowledge gained in Python programming.

Uploaded by

jpb16007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views14 pages

PWP MicroProject

The document outlines a micro-project titled 'Internet Based Media Converters' completed by three students from the Computer Engineering program at Government Polytechnic, Jalgaon during the 2021-2022 academic year. The project focuses on converting XML to JSON and vice versa using Python, highlighting the use of specific libraries and methodologies. The report includes a project proposal, methodology, resources used, code implementation, and a conclusion emphasizing the practical knowledge gained in Python programming.

Uploaded by

jpb16007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Programming with Python [22616]

MAHARASHTRA STATE BOARD OF TECHNICAL


EDUCATION

GOVERNMENT POLYTECHNIC, JALGAON


(0018/1567)

Program Name and Code : Computer Engineering (CO6I)


Course Name and Code : Programming with Python
(22616)
Academic Year : 2021-2022
Semester : VI
A MICRO PROJECT
On
Internet Based Media Converters

Submitted on / / by the group of 3 students:


Sr. Roll Enrollment Exam Seat
Name of student
No. No. No. No.

1 16 Shrutika Vitthal Mahajan 1900180199

2 33 Rakshanda Anil Giri 1900180217

3 34 Shreya Paras Agrawal 1900180218

Project Guide: Ms. Rupali Yewale


(Lecturer)

Internet Based Media Converters


Programming with Python [22616]

MAHARASHTRA STATE BOARD OF


TECHNICAL EDUCATION
Certificate

This is to certify that Students of CO6I (S.V.M., R.A.G., S.P.A.) Roll no.:16,
33, 34 of SIXTH Semester of Diploma in Computer Engineering of Institute,
Government Polytechnic, Jalgaon (Code:0018) has completed the Micro
Project satisfactorily in the Subject – Programming with Python for the
Academic Year 2021- 2022 as prescribed in the curriculum.

Place: Jalgaon
Date: / /

Subject Teacher Head of the Department Principal

Seal of
Institution

Internet Based Media Converters


Programming with Python [22616]

GOVTERNMENT POLYTECHNIC
JALGAON

-SUBMISSION-

We the Students of CO6I (S.V.M., R.A.G., S.P.A.) Roll No. 16, 33, 34
as students of SIXTH Semester of the Programme Computer Engineering
humbly submit that we have completed from time to time the Micro-Project
work as described in this report by our own skills and study between the period
from ________ 2022 to ______ 2022. As per instructions/guidance of
Rupali Ma’am and those following students were associated with us for this
work, however, quantum of our contribution has been approved by the Lecturer.
And that we have not copied the report on its any appreciable part from
any other literature in contravention of the academic ethics.

Date: / / Signature of Student

16.

33.

34.

Internet Based Media Converters


Programming with Python [22616]

Part A: A micro-project proposal


Internet Based Media Converters
1.0 Aims/Benefits of the micro project
 To study the concepts of Python packages

2.0 Course outcome addressed.


 Learned Python Playground Function
 Converted XML to JSON
 Converted JSON to XML

3.0 Proposed methodology


We have started with the conversion of XML file to JSON file using Python package and
BIF(Built-In-Function) and then implemented JSON to XML conversion code using Playground
function of Python with dict2xml .

4.0 Action Plan

Sr. Detail of activity Plan start Plan finish Name of responsible team members
No. date date
1 Group discussion 1]SHRUTIKA VITTHAL
2 Searching of real life task MAHAJAN.

3 Selection of micro project


topic
2] RAKSHANDA ANIL GIRI.
4 Gathering of information
and application of it

5 Group discussion 3] SHREYA PARAS


AGRAWAL.
6 Distribution of work to be
done.
7 Preparing the overview of
the project.

8 Gathering the details.


9 Preparing rough analysis of
the project.
10 Study functionality of each
of the tool in brief.
11 Designing the Application.
12 Group discussion.
13 Gathering the data.
14 Coding on calculation logic
for billing.
15 Finalizing Application.
16 Preparing report.

Internet Based Media Converters


Programming with Python [22616]

5.0 Resources used

Sr. Name of resource material Specifications Quantity


no.
1 PC Desktop with 8GB RAM 1
Processor: AMD Ryzen 5
5500U with Radeon Graphics
2.10 GHz
Hard Disk Drive: 512 SSD.
2 Operating System Windows 10 Home Single 1
Language
3 Software Pycharm 2021.3, Microsoft 1
word and any OS

Internet Based Media Converters


Programming with Python [22616]

PART-B Micro-Project Report


Internet Based Media Converters

1.0 Rationale
 To study the concepts of Python packages

1.0 Aims/Benefits of the micro project


 Learned to use built in packages and implement them

2.0 Course outcome addressed.


 Learned Python Playground Function
 Converted XML to JSON
 Converted JSON to XML

Internet Based Media Converters


Programming with Python [22616]

Teachers Evaluation Sheet


Name of student: Shrutika Mahajan, Rakshanda Giri, Shreya Agrawal.
Enrollment number: 1900180199, 1900180217, 1900180218
Name of Project: Internet Media Converter
Course Title: Programming with Python
Code: 22616

2.0 Course outcome addressed.


 Learned Python Playground Function
 Converted XML to JSON
 Converted JSON to XML

Evaluation as per Suggested Rubric Assessment of Micro Project


Characteristic to be assessed Poor Average Good Excellent
(Marks 1-3) (Marks 4-5) (Marks 6-8) (Marks 9-10)

Relevance to the course

Literature Review/ Information


collection

Analysis of Data and


Representation
Completion of the target as per
project proposal

Report preparation

Presentation of the Micro project

Micro-Project Evaluation Sheet


Process and Product Individual Presentation/Viva Total Marks
Assesment (4 marks) (10 marks)
(6 marks)

Internet Based Media Converters


Programming with Python [22616]

Introduction :
In this micro project, we have implemented the menu driven programming,
where user can use 2 Internet Media Converters between 3 given options as
follows :-
1. Convert XML to JSON
2. Convert JSON to XML
3. Exit
In option-1 user has to give XML file as input with the name of .JSON file,
here after conversion from .XML to .JSON, .JSON code is shown to user and
that same data is stored in the given .JSON file . We have used xmltodict
library for data conversion. We have also handled exception if the input .XML
file is not available or if the given extension is invalid.
In option-2 user has to give JSON file as input with the name of .XML file,
here after conversion from .JSON to .XML, .XML code is shown to user and
that same data is stored in the given .XML file. We have used dict2xml
library for data conversion. We have also handled exception if the
input .JSON file is not available or if the given extension is invalid.
If user selects option-3, the program terminates with the”Bye Bye” message,
otherwise the program executed repeatedly (Menu Driven)

Internet Based Media Converters


Programming with Python [22616]

Directory Structure of Project :

Internet Based Media Converters


Programming with Python [22616]

Code :

import numpy as np
import json
import xmltodict
from dict2xml import dict2xml

while True:
print("\n\n------------------------")
print("$$$$ CONVERSION MENU $$$$");
print("1.Convert XML to JSON")
print("2.Convert JSON to XML")
print("3.Exit")
print("------------------------")
Choice=int(input("Your choice "))

if Choice==1:
n = input('Enter the the file name ')
try:
with open(n) as xml_file:
try:
parsed_data = xmltodict.parse(xml_file.read())
xml_file.close()
except:
print("File error")
continue

except:
print("File not found")
continue

json_conversion = json.dumps(parsed_data)
opfile=input("Enter output json filename: ")
with open(opfile, 'w') as json_file:
json_file.write(json_conversion)
json_file.close()

Internet Based Media Converters


Programming with Python [22616]

print("The json file is :")


with open(opfile,'r') as file:
for line in file:
print(line, end="\n")
file.close()

elif Choice==2:
n = input('Enter the the file name ')
try:
with open(n) as json_format_file:
try:
d = json.load(json_format_file)
except:
print("File error")
continue
except:
print("File not found")
continue

xml=dict2xml(d)
opfile = input("Enter output json filename")
with open(opfile, 'w') as xml_file:
xml_file.write(xml)
xml_file.close()
print("The xml file is :")
with open(opfile, 'r') as file:
for line in file:
print(line,end="")
file.close()
elif Choice==3:
print("Bye Bye")
exit()
else:
print("Oops! Invalid Choice")

Internet Based Media Converters


Programming with Python [22616]

Output:

Internet Based Media Converters


Programming with Python [22616]

Internet Based Media Converters


Programming with Python [22616]

Conclusion
Thus, we have successfully created an the program for File conversion
(XML to JSON & JSON to XML).Our program gives convenience to those
who want to write data in both formats i.e in XML and JSON, so instead of
writing both of them from scratch, the person can write any one who he is
best at, and then convert it to other extension file which saves his time and
efforts.
While doing this project, we have gain a very good practical knowledge of
Python.

Internet Based Media Converters

You might also like