Skip to content

Instantly share code, notes, and snippets.

@rakjin
Last active August 29, 2015 14:16
Show Gist options
  • Save rakjin/02be9f522c07f082779d to your computer and use it in GitHub Desktop.
Save rakjin/02be9f522c07f082779d to your computer and use it in GitHub Desktop.
플라스크 프로젝트의 구조를 어찌하면 좋은가

flask proj

notes

  • use requirements.txt, not setup.py because it would not be a module...

trivia

  • unittest directory is tests, not test
  • use py.test or standard unittest module
  • absolute_import를 쓰면 좋을 것 같다. 하지만 욕심인 것 같기도.
  • deploy: fabric
  • blueprints: app, celery-worker-mail-sender, celery-worker-google-auth, celery-worker-apns, celery-worker-apns, ...

structure

  • /
    • myapp/
      • __init__.py # holds app
    • tests/
      • __init__.py
      • test_basic.py
    • requirements.txt # minimal requirements, with versions.
    • requirements-dev.txt # requirements for development (py.test, flake8, ...)
    • requirements-freeze.txt # store current working (proven) versions (from pip freeze)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment