Git Product home page Git Product logo

fbone's Introduction

INTRODUCTION

Fbone (Flask bone) is a Flask (Python microframework) template/bootstrap/boilerplate application, with best practices.

You can use it for

  • learning Flask.
  • kicking off your new project.

Flask bone homepage screenshot

FEATURES

Frontend Framework

Flask Extensions

Others

  • Well designed structure for large project.
  • Quickly Deploy via mod_wsgi and fabric.
  • Admin interface.
  • Home-bake logger.

USAGE

Pre-required:

  • Ubuntu (should be fine in other linux distro)
  • git
  • pip
  • fabric
  • sqlite
  • virtualenv
  • apache + mod_wsgi

Clone.

git clone https://github.com/imwilsonxu/fbone.git fbone

virtualenv.

fab setup

Debug.

fab d

Open http://127.0.0.1:5000, done!

Deploy with WSGI

Clone.

cd /var/www
git clone https://github.com/imwilsonxu/fbone.git fbone
sudo chown `whoami` -R fbone

vhost.

WSGIDaemonProcess fbone user=wilson group=wilson threads=5
WSGIScriptAlias /fbone /var/www/fbone/app.wsgi

<Directory /var/www/fbone/>
    WSGIScriptReloading On
    WSGIProcessGroup fbone
    WSGIApplicationGroup %{GLOBAL}
    Order deny,allow
    Allow from all
</Directory>

virtualenv.

fab setup

IMPORTANT:

  • Change INSTANCE_FOLDER_PATH in fbone/utils.py to suit yourself.
  • Put production.cfg under INSTANCE_FOLDER_PATH.

STRUCTURE

├── app.wsgi                (mod_wsgi wsgi config)
├── CHANGES
├── fabfile.py              (fabric file)
├── fbone                   (main app)
│   ├── api                 (api module)
│   ├── app.py              (create flask app)
│   ├── config.py           (config module)
│   ├── decorators.py
│   ├── extensions.py       (init flask extensions)
│   ├── frontend            (frontend module)
│   ├── __init__.py
│   ├── settings            (settings module)
│   ├── static
│   │   ├── css
│   │   ├── favicon.png
│   │   ├── humans.txt
│   │   ├── img
│   │   ├── js
│   │   └── robots.txt
│   ├── templates
│   │   ├── errors
│   │   ├── frontend
│   │   ├── index.html
│   │   ├── layouts 
│   │   ├── macros
│   │   ├── settings
│   │   └── user
│   ├── translations        (i18n)
│   ├── user                (user module)
│   │   ├── constants.py
│   │   ├── forms.py        (wtforms)
│   │   ├── __init__.py
│   │   ├── models.py
│   │   ├── views.py
│   ├── utils.py
├── LICENSE
├── manage.py               (manage via flask-script)
├── MANIFEST.in
├── README.markdown
├── screenshots
├── setup.py
└── tests                   (unit tests, run via `nosetest`)

LICENSE

MIT LICENSE

ACKNOWLEDGEMENTS

Thanks to Python, Flask, its extensions, and other goodies.

Bitdeli Badge

fbone's People

Contributors

bitdeli-chef avatar danhyun avatar imwilsonxu avatar passy avatar wassname avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.