You are on page 1of 6

Criterion C - Development

Techniques used:

Libraries used***explain all of them


Library Function in code
urllib.parse
urllib.request
app_mano
app_sass
os
os.path
flask
werkzeug.exceptions
werkzeug.utils

 Randomizing items in the excel sheet uploaded by user


 Calling functions from other procedures
 Data integration from original code and code generated by excel
 Cell formatting techniques from json to csv
 Styling using CSS
 Database connection***
 Deciding data path according to user’s computer system

1. Importing code from existing libraries.

These codes were used to import functions that are significant to the web application which is
the module in this case. Json was mainly used to help the user transmit data into the
application.

Figure 1

2. Changing data type from json to CSV

CSV (comma-separated values) file is a text file that has a specific format which allows
data to be saved in a table-structured format. And this will be presented to the user in a
more organized way to be easily understood. In this case, the data the user puts in the
application must be in CSV format so that it can be easily converted in the code into a
dictionary. And lastly, open a json writer, and use he json.dump() function.
the json.dump()
function used to
dump data into the
code for backing
up a database so
that its contents

Figure 2

3. Deciding the two file paths according to your computer system


In order for the code to function it has to decide if the files the user is importing into the web
application are placed in the correct format or way that the code would actually work on. In this
case the code would work on files that are “.csv” which was explained in the above segment.

Figure 3

4. Code used to import data from existing libraries.


In order for the user to be able to get an output after uploading the excel file to the web
application, the code should have code from other libraries which will be illustrated below.
Import os allows us to run a
command in the python
script
wekzeug.expectations was
used since there is no
standard format for faults or
exceptions in XML/HTTP
messaging, only the HTTP
status code is captured.

Figure 4
The import key work used in the code was used to make code in one
module available in another. Imports in Python are important for
structuring your code effectively.

5. Reading the json and convert it into the desired form which is excel.

Because VS-Code didn’t have the facilities to convert a csv into an excel shit, I had to creat an
account in an external application that will be able to do the conversions whenever a file is
imported to the web application. This external application will send it through my email directly
to the web application thus giving the user the product that they deserve.

You might also like