HennaAbbas / pythonanywhere

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automating Flask Deployments With PythonAnywhere

CircleCI

Application Description

Swagger documentation for a flask API application

Setup

  1. Clone repo
  2. create and change into directory
  3. Set Flask environment (ps: check the config.py file)
  • FLASK_ENV=default uses sqlite
  • FLASK_ENV=postgres uses postgres db
  1. set virtualenv with pipenv --three
  2. Install with pipenv install

Deployed Version

Deployed documentation version: https://waweru.pythonanywhere.com/api-docs/

Local setup

  • run pipenv shell to shart virtualenv
  • run: python run.py serving point of the API
  • app running on http://127.0.0.1:5000/
  • Documentation being served on /api-docs endpoint

Running Tests locally

pipenv run pytest

Details

This repo is built following a tutorial published on CircleCI blog under the CircleCI Guest Writer Program.

About CircleCI Guest Writer Program

Join a team of freelance writers and write about your favorite technology topics for the CircleCI blog. Read more about the program here.

Reviewers: Ron Powell, Stanley Ndagi, Amos Omondi

About


Languages

Language:Python 96.9%Language:Mako 3.0%Language:Procfile 0.1%