Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Whoogle Search | 7,463 | 3 days ago | 21 | June 13, 2022 | 53 | mit | Python | |||
A self-hosted, ad-free, privacy-respecting metasearch engine | ||||||||||
Blockchain | 7,237 | 5 months ago | 115 | mit | C# | |||||
A simple Blockchain in Python | ||||||||||
Proxypool | 4,411 | 3 months ago | 33 | mit | Python | |||||
An Efficient ProxyPool with Getter, Tester and Server | ||||||||||
Nginx Ui | 4,294 | a month ago | 21 | mit | Python | |||||
Nginx UI allows you to access and modify the nginx configurations files without cli. | ||||||||||
App | 3,770 | 3 days ago | 118 | agpl-3.0 | Python | |||||
The SimpleLogin back-end | ||||||||||
Kubernetes Workshop | 3,178 | 3 months ago | 8 | Python | ||||||
⚙️ A Gentle introduction to Kubernetes with more than just the basics. 🌟 Give it a star if you like it. | ||||||||||
Uwsgi Nginx Flask Docker | 2,836 | a month ago | 31 | apache-2.0 | Python | |||||
Docker image with uWSGI and Nginx for Flask applications in Python running in a single container. Optionally with Alpine Linux. | ||||||||||
Yacht | 2,663 | 9 days ago | 138 | mit | Vue | |||||
A web interface for managing docker containers with an emphasis on templating to provide 1 click deployments. Think of it like a decentralized app store for servers that anyone can make packages for. | ||||||||||
Iptv M3u Maker | 2,110 | 10 months ago | 22 | mit | HTML | |||||
IPTV 国内+国外 电视台直播源m3u文件, 收集&汇总&本地源脚本 | ||||||||||
Git Webhook | 1,339 | 6 years ago | 12 | mit | Python | |||||
:octocat: 使用 Python Flask + SQLAchemy + Celery + Redis + React 开发的用于迅速搭建并使用 WebHook 进行自动化部署和运维,支持 Github / GitLab / Gogs / GitOsc。 |
# .___ __ _____ __ __ .__
# ______ __| _/_____/ |_ / _ \ __ ___/ |_ ____ _____ _____ _/ |_|__| ____ ____
# / ___// __ |/ __ \ __\/ /_\ \| | \ __\/ _ \ / \\__ \\ __\ |/ _ \ / \
# \___ \/ /_/ \ ___/| | / | \ | /| | ( <_> ) Y Y \/ __ \| | | ( <_> ) | \
# /____ >____ |\___ >__| \____|__ /____/ |__| \____/|__|_| (____ /__| |__|\____/|___| /
# \/ \/ \/ \/ \/ \/ \/
sample project building an api using flask and python
This project is made for anyone who is looking for an example of how to create a rest endpoint using Python and Flask.
This service calls a local sqlite database. Please see databases directory for more details.
This projet was written using PyCharm Community Edition.
This project uses Pipenv for virtual environment management.
If you are on MacOS you can install the dependency using homebrew:
brew install pipenv
Next run the following command to install the dependencies on your local computer:
pipenv install
After you have performed all the dependency installations from above, you can run the following command on your terminal to start this app.
From the root of this project enter the following terminal command:
pipenv run python app.py
Or you can also start the application using PyCharm.
This project uses a local sqlite for a repository.
This project contains a swagger ui.
For more information regarding swagger. Click here.
For more information regarding connexion. Click here.
To view this api's swagger ui, run this application, then navigate to [http://localhost:5000/ui/]
You can test out this api entirely from the swagger ui page.
This app is also deployed using heroku. To view deployed api swagger navigate to [https://sdet-flask-api.herokuapp.com/ui/]
GET - getAll: users/v1
GET - getByUsername: users/v1/darth
PUT - updateUserEmail: users/v1/darth + include a json body with new email.
DELETE - deleteUsername: users/v1/darth
GET - getAll: users/v1
GET - getByUsername: users/v1/darth
PUT - updateUserEmail: users/v1/darth + include a json body with new email.
DELETE - deleteUsername: users/v1/darth
GET - getAll: locations/v1
GET - getByState: locations/v1/ca
PUT - updateCapital: locations/v1/ca + include a json body with new capital.
DELETE - deleteLocation: locations/v1/ca
GET - getAll: locations/v1
GET - getByState: locations/v1/ca
PUT - updateCapital: locations/v1/ca + include a json body with new capital.
DELETE - deleteLocation: locations/v1/ca
This api is fully tested with Unit Tests and Integration tests. Please see tests directory for examples.
Tests connect to test.db for integration tests.
This project is a Flask project. For more information click here
This application can be run in Docker. Please see Dockerfile for image setup. Steps to create an image & how to run the app in a container list below. (must have docker installed)
Create a docker image: docker build -t flask-api .
Run docker container: docker run -it -p 5000:5000 flask-api
*** Once app has started, view the swagger ui by navigating to [http://localhost:5000/ui/] ***
View docker images: docker images
View docker containers: docker ps -a
Remove docker images: docker rmi $(docker images -q)
Remove docker containers: docker rm $(docker ps -aq)
Click here for more information regarding docker
* Note: this flask app by default runs as a development server, not meant for production. Docker & gunicorn is used to productionize this app. This docker container runs as as a production WSGI server, with 4 workers via gunicorn. *
A web hook has been setup with Travis CI for all Push and Pull Requests.
A web hook has also been setup with Github Actions for all Push and Pull Requests.
This app is setup to deploy via heroku after a successful CI.
To view deployed api swagger click here
Feel free to fork this repo, add to it, and create a pull request if you like to contribute.
If you have any questions, you can contact me via email: [email protected]