The internet is increasingly becoming an integral part of lives. Ever since the invention of electronic mail by Ray Tomlinson, emails have grown to become the primary medium of exchanging information over the internet between two or more people, until the advent of Instant Messaging (IM) Apps.
As EPIC Andelans who work towards advancing human potential and giving back to the society, we wish to empower others by building a web app that helps people exchange messages/information over the internet.
This project is about a set of API endpoints for the EpicMail app that the user interface interacts with and store user data and emails in memory using Data Structures.
- Sign-up a user.
- Login a user.
- Send an email.
- Get all recieved emails.
- Get all sent emails.
- Get all saved email drafts.
- Get all read emails.
- Get all unread emails.
- Get a specific email by ID.
- Delete an email by ID.
- Project Description
- Project Planning
- Language and Tools used
- Installing
- Running the application
- Unit Testing the app
- Available Version
- Deployed Version
- API Documentation
PivotalTracker was used for project Planning and Management. You can find this project's PivotalTracker Board here
- Python 3.7
- Flask
- Pip - A python package installer
- Virtualenv
- Git
- VSCode (IDE)
- Open API
- Swagger
- Postman
- PivotalTracker
-
Step 1: Open the Terminal (or git bash, for windows) on the Directory/Folder where you want to place the project.
-
Step 2: Then run this command
git clone https://github.com/HabibSentongo/epicmail2.git
This copies the entire project onto your local machine. Confirm that the project name is “epicmail2”
-
Navigate to the root folder of the project using the command below.
cd epicmail
-
Step 4: Change to the "develop" branch using the command below.
git checkout develop
Inorder to set up the virtual environment, you need to install the python package called virtualenv using pip. Run the command below to install it.
pip install virtualenv
to install virtualenvvirtualenv venv
to create a virtual environment named venv. venv/scripts/activate
to activate the virtual environment.. venv/scripts/deactivate
to deactivate the virtual environment when you need to.
You need to install all the packages required by the project in the activated virtual environment. All these requirements are listed and stored in the requirements.txt file in the root folder of the project. While in this folder, run the command below to install these requirements.
pip install -r requirements.txt
With success of all the above steps, you have successfully cloned and configured the project to run on your local machine.
To run this application, while in the root folder of the project via the Terminal or command prompt, run the command below:
py main.py
On running that command, the application server will be launched and the URL to that server will be shown to you in the command-line/terminal.
- Pytest has been used to test these API endpoints. To run unit tests for this application, you must install pytest, pytest-cov and coverage on your pc or in your virtual environment.
- While in the root directory of the project, run the command below to run the unit tests and also generate a coverage report.
pytest --cov
The endpoints of this application have been versioned. The current version is one (1); i.e.: api/v1
Find the deployed API here
The endpoints of this application have been well documented using Swagger Flasgger. Find the API Documentation here