List of known planets so far discovered
-
Clone or Pull the repo
-
To use the email functionality you will need to create .env file and add the following environment variables
MAIL_USERNAME=your_email_address MAIL_PASSWORD=your_email_password MAIL_PORT=your_email_provider_smtp_port MAIL_SERVER=your_email_smpt_address
-
To be able to use JWT for content management add the following enviroment variable to .env
SECRET_KEY=your_secret_key
-
Run the following shell command
./build_docker.sh && ./run_docker.sh
-
Open you browser and visit localhost:5000 or execute the following shell command to verify the app is running
curl localhost:5000
You should received the message Hello World
NOTE: if you are using Windows, consider executing point 4 using git bash
https://stackabuse.com/dockerizing-python-applications/
-
Build the image with
docker build -t [img_name]
Default image name flask-web-app
-
To run the image
docker run --name [app_name] -v $PWD/src:/www/src -p 5000:5000 [img_name]
Add a -d to run in the background
Default app_name flaskapp
-
Start the image
docker -i start [app_name]
The -i indicates for interactive mode if needed for debugging
-
Stop the image
docker stop [app_name]
Just having Docker, because is more fun that way
GET /planets
PUT /add_planet
DELETE /delete_planet/<planet_id>
[
{
"distance": 100000000.0,
"home_star": "Golden Orb of Day",
"mass": 1.08e+25,
"planet_id": 1,
"planet_name": "Aiur",
"planet_type": "Class M",
"radius": 6636.0
},
{
"distance": 67240000.0,
"home_star": "Sol",
"mass": 4.867e+24,
"planet_id": 2,
"planet_name": "Venus",
"planet_type": "Class K",
"radius": 3760.0
}
]
In progress
In progress
- Refactory
- Create modules
- Single responsitility implementation
- Update routes
- Middleware for content management
- Python3 - Programming Language
- Docker - Container
- Flask - Web Framework
- SQLAlchemy - SQL Toolkit and ORM
- JWT - Used to generate, check, validate user identity and content management
We use SemVer for versioning. For the versions available, see the tags on this repository.
This project is based on the course Building RESTful APIs with Flask with customizations and modifications done by Henry Valbuena. That's me 😄
This project is licensed under the MIT License - see the LICENSE.md file for details