• This repository has been archived on 22/Feb/2024
  • Stars
    star
    1,597
  • Rank 29,298 (Top 0.6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 11 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Example Flask application illustrating some of my common practices

Overholt

Overholt is an example Flask application illustrating some of my common practices

Development Environment

At the bare minimum you'll need the following for your development environment:

  1. Python
  2. MySQL
  3. Redis

It is strongly recommended to also install and use the following tools:

  1. virtualenv
  2. virtualenvwrapper
  3. Vagrant
  4. Berkshelf

Local Setup

The following assumes you have all of the recommended tools listed above installed.

1. Clone the project:

$ git clone [email protected]:mattupstate/overholt.git
$ cd overholt

2. Create and initialize virtualenv for the project:

$ mkvirtualenv overholt
$ pip install -r requirements.txt

3. Install the required cookbooks:

$ berks install

4. Install the Berkshelf plugin for Vagrant:

$ vagrant plugin install vagrant-berkshelf

5. Start virtual machine:

$ vagrant up

6. Upgrade the database:

$ alembic upgrade head

7. Run the development server:

$ python wsgi.py

8. In another console run the Celery app:

$ celery -A overholt.tasks worker

9. Open http://localhost:5000

Development

If all went well in the setup above you will be ready to start hacking away on the application.

Database Migrations

This application uses Alembic for database migrations and schema management. Changes or additions to the application data models will require the database be updated with the new tables and fields. Additionally, ensure that any new models are imported into the consolidated models file at overholt.models. To generate a migration file based on the current set of models run the following command:

$ alembic revision --autogenerate -m "<a description of what was modified>"

Review the resulting version file located in the alembic/versions folder. If the file is to your liking upgrade the database with the following command:

$ alembic upgrade head

For anything beyond this workflow please read the Alembic documentation.

Management Commands

Management commands can be listed with the following command:

$ python manage.py

These can sometimes be useful to manipulate data while debugging in the browser.

Tests

To run the tests use the following command:

$ nosetests

More Repositories

1

flask-social-example

An application that serves as a working example for Flask-Social
Python
161
star
2

ansible-tutorial

Example code for a tutorial on using Ansible for setup and deployment of a Flask/WSGI application on Ubuntu
Shell
71
star
3

vagrant-ansible-tutorial

Example application and Ansible playbooks for setting up a multi server environment with Vagrant
Shell
67
star
4

flask-security-example

Example applications for Flask-Security
Python
57
star
5

vpc-consul

A VPC CloudFormation stack designed for a Consul cluster provisioned with Ansible
Python
46
star
6

spring-social-instagram

Instagram API binding for Spring Social
Java
45
star
7

gevent-socketio-tutorial

A basic application that illustrates how to push long running task output to the browser.
Python
35
star
8

spring-social-foursquare

Foursquare API binding for Spring Social
Java
33
star
9

wsgi-cookbooks

A collection of Chef cookbooks for running and deploying arbitrary WSGI applications with nginx and uWSGI
Ruby
15
star
10

jameson

ActionScript 3 JSON Document Object Mapper
ActionScript
14
star
11

spring-social-foursquare-example

Demonstrates the use of spring-social-foursquare
Java
12
star
12

asylum

An experimental Access Control library
Python
11
star
13

spring-social-instagram-example

Demonstrates the use of spring-social-instagram
Java
10
star
14

flabric

Flabric allows you to easily create and configure servers for Python projects on Amazon EC2 or Rackspace Cloud Servers
Python
7
star
15

nextjs-pipeline-example

JavaScript
7
star
16

mustache-with-webpy

An example of how one might use mustache templates with web.py via pystache
Python
7
star
17

flask-nyc-deploying

Files used during my "Deploying Flask (WSGI) Applications" presentation at Flask-NYC meetup
Python
7
star
18

cubric

Cubric allows you to easily create servers, configure servers and deploy WSGI applications on Amazon EC2 or Rackspace Cloud Servers using Fabric and Cusine
Python
7
star
19

AS3-Toolkit

A collection of goodies for developing ActionScript 3 applications
ActionScript
6
star
20

acme

A rudimentary CQRS/ES architecture built with Kotlin
Kotlin
6
star
21

pygotham2014

Files supporting a presentation given at PyGotham 2014 entitled `Python Apps and Docker`
Python
5
star
22

Paint-Toolkit

Abstracted class toolkit for creating paint apps
4
star
23

mattupstate.github.io

JavaScript
3
star
24

stackdriver-cookbook

Stackdriver Chef Cookbook
Ruby
3
star
25

docker-devpi-web

devpi-web Docker image
3
star
26

javascript-vehicles

A JavaScript implementation of simple steered vehicles, sometimes known as 'boids'
JavaScript
2
star
27

Out

Logging utility for use with Monster Debugger
ActionScript
2
star
28

ansible-role-lua

Configures and installs Lua software
2
star
29

docker-logstash

Logstash Dockerfile
Shell
1
star
30

Developer-Guidelines

A general set of developer guidelines
1
star
31

draughtnaut-django

DraughtNaut is a website I use to learn new languages and frameworks. In this case, Python and Django
Python
1
star
32

angular-pipeline-example

TypeScript
1
star
33

docker-devpi

devpi Docker image
Shell
1
star
34

what-if

Coding exercise using Python, Django, and MongoDB
1
star
35

cubric-example

An example application that can be deployed to EC2 or Rackspace Cloud Servers using Cubric
Python
1
star