Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/murphyadam/kickstart-flask-app
Generate a new Flask app project.
https://github.com/murphyadam/kickstart-flask-app
create-app flask kickstart python
Last synced: 30 days ago
JSON representation
Generate a new Flask app project.
- Host: GitHub
- URL: https://github.com/murphyadam/kickstart-flask-app
- Owner: MurphyAdam
- License: mit
- Created: 2020-12-08T14:49:40.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-09T12:31:17.000Z (6 months ago)
- Last Synced: 2024-10-10T08:23:32.214Z (30 days ago)
- Topics: create-app, flask, kickstart, python
- Language: Python
- Homepage: https://pypi.org/project/kickstart-flask-app/
- Size: 90.8 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kickstart-flask-app
This is a simple package to kickstart a new Flask app project.
It creates a new Flask project with a simple structure and some endpoints.## Install
```bash
pip install kickstart-flask-app
```## Usage
You could use this package in two ways:
### 1. Command line (recommended)
Type the following in your terminal
```bash
kickstart-flask-app
```The above will propmt you to enter some data, press enter to use defaults.
This will create a new Flask project in the path you run the python interpreter### 2. The Python interpreter
```py
from kickstart_flask_app import consoleconsole()
```
Same as the command line, this will prompt you to enter some data, press enter to use defaults.
## Start the server
First, setup the virtual environment and set environment variables. (APP_ENV or FLASK_ENV to 'dev' or 'prod')
```bash
cd
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
export FLASK_ENV=dev
```Then start the server
```bash
python wsgi.py
```The server should be running on `http://localhost:5000`
## Endpoints provided
`/` renders html template
`/api` returns json data