overholt

Example Flask application illustrating some of my common practices

  • 所有者: mattupstate/overholt
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

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 git@github.com: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

主要指標

概覽
名稱與所有者mattupstate/overholt
主編程語言Python
編程語言Ruby (語言數: 6)
平台
許可證MIT License
所有者活动
創建於2013-06-26 16:39:12
推送於2020-03-28 03:18:47
最后一次提交2014-09-16 12:05:17
發布數0
用户参与
星數1.6k
關注者數58
派生數233
提交數27
已啟用問題?
問題數36
打開的問題數18
拉請求數3
打開的拉請求數6
關閉的拉請求數6
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?