Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/svenstaro/python-web-boilerplate
Python web template for modern web backend applications
https://github.com/svenstaro/python-web-boilerplate
best-practices boilerplate flask sqlalchemy web
Last synced: 2 months ago
JSON representation
Python web template for modern web backend applications
- Host: GitHub
- URL: https://github.com/svenstaro/python-web-boilerplate
- Owner: svenstaro
- License: mit
- Created: 2016-12-18T11:22:42.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-09-05T14:13:47.000Z (over 2 years ago)
- Last Synced: 2024-10-04T13:18:17.141Z (3 months ago)
- Topics: best-practices, boilerplate, flask, sqlalchemy, web
- Language: Python
- Size: 350 KB
- Stars: 22
- Watchers: 4
- Forks: 8
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python Web Boilerplate
[![Build Status](https://travis-ci.org/svenstaro/python-web-boilerplate.svg?branch=master)](https://travis-ci.org/svenstaro/python-web-boilerplate)
[![codecov](https://codecov.io/gh/svenstaro/python-web-boilerplate/branch/master/graph/badge.svg)](https://codecov.io/gh/svenstaro/python-web-boilerplate)
[![license](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/svenstaro/python-web-boilerplate/blob/master/LICENSE)## About
This is a boilerplate project made using best practices for getting started quickly
in a new project. I made this for myself but maybe it will help someone else. Pull
requests and discussions on best practices welcome!## Development setup
Install all dependencies into a virtualenv which will be managed by `poetry`.
make
Set up your environment by sourcing copying `.env.example` to `.env`
cp .env.example .env
For every new shell you need to source this file and you're good to go.
Make sure you have a working local postgres setup. Your current user should be
admin in your development postgres installation and it should use the "peer" or
"trust" auth methods (see `pg_hba.conf`). Given that, create a local
development database with some test data:flask initdb
Afterwards, type
flask run
to run the development server.
## Running the tests
Start a local postgresql server and run:
poetry run pytest