Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 7 days ago
JSON representation

Generate a new Flask app project.

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 console

console()

```

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