Skip to content

A simple Python Project. Using Flask and hence Html, creating a simple website to display ouput after slicing the given email in python.

License

Notifications You must be signed in to change notification settings

etank0/email-slicer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

email-slicer

( Python Mini Project )

In this project I have made a webpage that will take an email address as an input and show us the "Email Username", "Email Domain" and "Suggested Username". I have used Flask as backend, the website will be hosted on a local server, which we can view in any browser.

Table of Contents

Setup

In setup, you have to install flask and set up a virtual environment having all the required dependencies. Everything is explained on the Flask website :

Files

Files needed here are inside "myproject" folder as mentioned on the above linked webpage.(Please follow all the steps mentioned on the flask website and then come back and continue.)

app.py

This is our main Python file. The email-slicer code is here and the result or returned output is going to be displayed on our website.

#Below lines of my Python file are the most important.

      email = email.strip()  #getting rid of unnecessary spaces
      email1 = email.split("@")[0]  #splitting the string at '@" symbol 
      domain = email.split("@")[1]  #assigning domain address to a variable

templates

This is the folder where we will keep our Html files. I have only used one page i.e. "index.html". You can have more.

static

This is the folder where you can put files that you would like to add in your website. I have an image i.e. "bg.jpg" which is used as the background for my html file. I also have a 'styles.css' file that is used for styling.

Result

Let's look at how the website looks and functions.

Running app.py from terminal

Screen2

Fresh in Firefox

Screenshot from 2022-12-02 01-34-49

Result after entering Email

Screenshot from 2022-12-02 01-36-47

About

A simple Python Project. Using Flask and hence Html, creating a simple website to display ouput after slicing the given email in python.

Topics

Resources

License

Stars

Watchers

Forks