https://github.com/cham11ng/flask-api-starter
Starter for Flask API (Python) 🐍
https://github.com/cham11ng/flask-api-starter
flask makefile pytest python
Last synced: about 2 months ago
JSON representation
Starter for Flask API (Python) 🐍
- Host: GitHub
- URL: https://github.com/cham11ng/flask-api-starter
- Owner: cham11ng
- License: mit
- Created: 2018-05-28T04:02:31.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2025-01-26T03:31:30.000Z (over 1 year ago)
- Last Synced: 2025-04-05T07:27:04.898Z (about 1 year ago)
- Topics: flask, makefile, pytest, python
- Language: Python
- Homepage:
- Size: 32.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# flask-api-starter
This is a Flask API starter serves as a foundation for building new software applications, provides basic structure and functionality to help developer to get started quickly.
## Getting Started
```bash
cp .env.example .env
```
```bash
python -c 'import os; print(os.urandom(8))'
# Update SECRET_KEY= in .env file
```
```bash
pip install -r requirements.txt
```
```bash
$ make
clean Remove Python file artifacts.
mvenv Create virtual environment.
install Install dependencies.
upgrade Upgrade dependencies.
lint Lint project.
pretty Prettify project.
run Run application.
debug Debug application.
test Run tests.
```
```bash
$ make run
* Serving Flask app 'src/app'
* Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Running on http://127.0.0.1:5000
Press CTRL+C to quit
```
```bash
curl -X GET localhost:5000
curl -X POST -H "Content-Type: application/json" \
-d '{"hello": "request"}' localhost:5000/health
```
## Happy Coding
> @cham11ng