All Projects → tony → Cookiecutter Flask Pythonic

tony / Cookiecutter Flask Pythonic

Pythonic starter boilerplate for Flask

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Cookiecutter Flask Pythonic

Flask Rest Template
template for a rest app with flask, flask-rest and more...
Stars: ✭ 95 (+156.76%)
Mutual labels:  flask, template
Kotlin Android Mvvm Starter
Android Kotlin Starter is a starter project which implements MVVM Pattern.
Stars: ✭ 276 (+645.95%)
Mutual labels:  cookiecutter, template
Tedivms Flask
Flask starter app with celery, bootstrap, and docker environment
Stars: ✭ 142 (+283.78%)
Mutual labels:  flask, template
Django Project Template
Thorgate's Django project template - Django, React, Sass, optional Docker and more
Stars: ✭ 91 (+145.95%)
Mutual labels:  cookiecutter, template
Template Python
A template for new Python libraries.
Stars: ✭ 479 (+1194.59%)
Mutual labels:  cookiecutter, template
Wemake Python Package
Bleeding edge cookiecutter template to create new python packages
Stars: ✭ 235 (+535.14%)
Mutual labels:  cookiecutter, template
Ml React App Template
This is a template for creating a Machine Learning application with its front-end developed using React which interacts with a Flask service as the back-end and makes predictions.
Stars: ✭ 210 (+467.57%)
Mutual labels:  flask, template
Flango
A Django template for using Flask for the frontend, Django for the backend.
Stars: ✭ 188 (+408.11%)
Mutual labels:  flask, template
Full Stack
Full stack, modern web application generator. Using Flask, PostgreSQL DB, Docker, Swagger, automatic HTTPS and more.
Stars: ✭ 451 (+1118.92%)
Mutual labels:  flask, cookiecutter
Flasksaas
A great starting point to build your SaaS in Flask & Python, with Stripe subscription billing 🚀
Stars: ✭ 412 (+1013.51%)
Mutual labels:  flask, template
Cookietemple
A collection of best practice cookiecutter templates for all domains and languages with extensive Github support
Stars: ✭ 81 (+118.92%)
Mutual labels:  cookiecutter, template
Cookiecutter
DEPRECIATED! Please use nf-core/tools instead
Stars: ✭ 18 (-51.35%)
Mutual labels:  cookiecutter, template
React Native Template
Template React Native project to be used with Cookiecutter
Stars: ✭ 61 (+64.86%)
Mutual labels:  cookiecutter, template
Cookiecutter Flask Minimal
Cookicutter template for minimal production-ready Flask project
Stars: ✭ 48 (+29.73%)
Mutual labels:  flask, cookiecutter
Cookiecutter Flask
A flask template with Bootstrap 4, asset bundling+minification with webpack, starter templates, and registration/authentication. For use with cookiecutter.
Stars: ✭ 3,967 (+10621.62%)
Mutual labels:  flask, cookiecutter
Cookiecutter Flask Restful
Flask cookiecutter template for builing APIs with flask-restful, including JWT auth, cli, tests, swagger, docker and more
Stars: ✭ 556 (+1402.7%)
Mutual labels:  flask, cookiecutter
Cookiecutter Pylibrary
Enhanced cookiecutter template for Python libraries.
Stars: ✭ 862 (+2229.73%)
Mutual labels:  cookiecutter, template
React Rapid
React-Rapid: Fast, Responsive & Free React Starter Template
Stars: ✭ 33 (-10.81%)
Mutual labels:  template
Healthcheck
Health Check ✔ is a Machine Learning Web Application made using Flask that can predict mainly three diseases i.e. Diabetes, Heart Disease, and Cancer.
Stars: ✭ 35 (-5.41%)
Mutual labels:  flask
Sao
⚔ Futuristic scaffolding tool
Stars: ✭ 966 (+2510.81%)
Mutual labels:  template

=========================== cookiecutter-flask-pythonic

.. image:: https://img.shields.io/travis/tony/cookiecutter-flask-pythonic.svg :target: https://travis-ci.org/tony/cookiecutter-flask-pythonic

Forked from cookiecutter_ template for a Python package. Forked from audreyr/cookiecutter-pypackage_ + tony/cookiecutter-pypackage-pythonic_.

It is inspired by flask_ and werkzeug's project style patterns. It is used on the tmuxp, cihai-python_ and vcspull_ projects. The app object is based on early versions pypa/warehouse, when it used werkzeug (see warehouse's old app object_).

  • Free software: BSD license
  • Vanilla testing setup with unittest and python setup.py test
  • Travis-CI_: Ready for Travis Continuous Integration testing
  • Tox_ testing: Setup to easily test for Python 2.6, 2.7, 3.3
  • Sphinx_ docs: Documentation ready for generation with, for example, ReadTheDocs_. Note: You can install sphinx docs requirements with $ pip install -r docs/requirements.txt.

.. _warehouse's old app object: https://github.com/pypa/warehouse/blob/werkzeug/warehouse/application.py#L68

Additions and changes

  • (feature) app factory can be configured with ini, yaml or json (pypa/warehouse, cihai style) and by specifying options via CLI. Flask-Script only supports -c config_file. Application factory can be wired to support option args and config file (pypa/warehouse, cihai)
  • (feature / removal) - use flask testing client_ for tests, remove dependency on flask-testing_.
  • (feature) config file declaratively pulls blueprints from python paths add them in the app factory.
  • (coverage) unittests against flask api, blueprint example module.

.. _pypa/warehouse: https://github.com/pypa/warehouse .. _cihai: https://github.com/cihai/cihai-python .. _flask testing client: http://flask.pocoo.org/docs/testing/ .. _flask-testing: https://pythonhosted.org/Flask-Testing/

Testing


- `flask`_/`werkzeug`_-style testsuites. See `werkzeug testsuite`_ on
  github.
- Use ``run-tests.py`` to run all tests, or pass in arguments to test a
  particular ``TestSuite``, ``TestCase`` or ``Test``:

  .. code-block:: bash

      $ ./run-tests.py
      $ ./run-tests.py yourpackage
      $ ./run-tests.py repo_name.repo_name  # package_name.TestSuite
      $ ./run-tests.py yourpackage.testsuite.test_something
      $ ./run-tests.py testsuite.test_something
      $ ./run-tests.py test_something
      $ ./run-tests.py test_something test_something_docstring

- ``setup.py`` downloads ``unittest2`` for python 2.6.

Python 2.7+3.3
  • .. code-block:: python

    from __future__ import absolute_import, division, print_function, \
        with_statement, unicode_literals
    
  • repo_name/_compat.py module (derived from flask, werkzeug and jinja2.) Why a compatibility module? See Armin Ronacher's post Porting to Python 3 Redux_.

.. _Porting to Python 3 Redux: http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/

Packaging


- ``repo_name/__init__.py`` + ``repo_name/__about__.py``: Metadata in
  ``repo_name/__init__.py`` e.g. ``__title__``, ``__author__`` can be
  accessed via:

  .. code-block:: python

      >>> about = {}
      >>> with open("repo_name/__about__.py") as fp:
      >>>     exec(fp.read(), about)
      >>> print(about['__title__'])
      Your project name

  Keeps ``setup.py`` and ``doc/conf.py`` in sync with package metadata.
  pypi and readthedocs distributions build off the latest package data.

  This method avoids cost of tokenizing and importing python file and
  avoids encountering potential import errors that may arise. It simply
  opens a vanilla python file and evals it.

  Derived from `pypa/warehouse`_.

- Relative imports in ``repo_name/__init__.py``.
- Relative imports in ``repo_name/testsuite/__init__.py``.
- Relative imports in ``repo_name/testsuite/{{ cookiecutter.package_name }}.py``.

.. _pypa/warehouse: https://github.com/pypa/warehouse

Docs
~~~~

- ``README.rst`` reStructuredText table for project information.
- vim modelines for ``rst`` in ``TODO`` and ``CHANGELOG``.
- ``docs/requirements.txt``, which can be targetted to install `sphinx
  changelog`_ package on `ReadTheDocs`. It will also trigger `-r
  ../requirements.txt`.
- `sphinx changelog`_ module, (imitation of `sqlalchemy`_, see `sqlalchemy
  changelog`_)
- Add ``TODO`` and ``docs/roadmap.rst``.
- Rename ``CHANGELOG.rst`` -> ``CHANGELOG``.
- Add ``docs/api.rst`` for documentation of API code. Initial class
  imported with docstring example.
- Automatically generate header spacing based on length of
  ``cookiecutter`` variables.

Example data
  • Example TestCase.
  • Example Class w/ docstrings.

.. _flask: http://flask.pocoo.org .. _werkzeug: http://werkzeug.pocoo.org .. _werkzeug testsuite: https://github.com/mitsuhiko/werkzeug/tree/master/werkzeug/testsuite .. _sqlalchemy: http://sqlalchemy.org .. _sqlalchemy changelog: http://docs.sqlalchemy.org/en/latest/changelog/ .. _sphinx changelog: https://pypi.python.org/pypi/changelog .. _cookiecutter: https://github.com/audreyr/cookiecutter .. _cookiecutter-pypackage: https://github.com/audreyr/cookiecutter-pypackage .. _How can I get the version defined in setup.py setuptools in my package?: http://stackoverflow.com/a/3619714

Usage

Install cookiecutter_:

.. code-block:: bash

$ sudo pip install cookiecutter

Generate a Python package project:

.. code-block:: bash

$ cookiecutter https://github.com/tony/cookiecutter-flask-pythonic.git

Then:

  • Create a repo and put it there.
  • Add the repo to your Travis-CI_ account.
  • Add the repo to your ReadTheDocs_ account + turn on the ReadTheDocs service hook.
  • Release your package the standard Python way. Here's a release checklist: https://gist.github.com/audreyr/5990987

Not Exactly What You Want?

Don't worry, you have options:

Similar Cookiecutter Templates


* `audreyr/cookiecutter-pypackage`_: Forked from
  ``tony/cookiecutter-pypackage-pythonic``.
* `tony/cookiecutter-pypackage-pythonic`_: This package's fork. Includes
  python 2 + 3, sphinx, unit tests, and more.
* `sloria/cookiecutter-flask`_: A flask template with Bootstrap 3, asset
  bundling + minification, starter templates and user accounts.
* Also see the `network`_ and `family tree`_ for this repo. (If you find
  anything that should be listed here, please add it and send a pull
  request!)

.. _tony/cookiecutter-pypackage-pythonic: https://github.com/tony/cookiecutter-pypackage-pythonic
.. _sloria/cookiecutter-flask: https://github.com/sloria/cookiecutter-flask

Testing
~~~~~~~

.. code-block:: shell

   $ pip install -r dev-requirements.txt
   $ sniffer
   # edit any file in {{cookiecutter.repo_name}}
   # todo: add run-tests.py for one-time runs

Fork This / Create Your Own
~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you have differences in your preferred setup, I encourage you to fork this
to create your own version. Or create your own; it doesn't strictly have to
be a fork.

* Once you have your own version working, add it to the Similar Cookiecutter
  Templates list above with a brief description. 

* It's up to you whether or not to rename your fork/own version. Do whatever
  you think sounds good.

Or Submit a Pull Request
~~~~~~~~~~~~~~~~~~~~~~~~

I also accept pull requests on this, if they're small, atomic, and if they
make my own packaging experience better.


.. _Travis-CI: http://travis-ci.org/
.. _Tox: http://testrun.org/tox/
.. _Sphinx: http://sphinx-doc.org/
.. _ReadTheDocs: https://readthedocs.org/
.. _`Nekroze/cookiecutter-pypackage`: https://github.com/Nekroze/cookiecutter-pypackage
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
.. _`network`: https://github.com/audreyr/cookiecutter-pypackage/network
.. _`family tree`: https://github.com/audreyr/cookiecutter-pypackage/network/members
.. _tmuxp: https://github.com/tony/tmuxp
.. _vcspull: https://github.com/tony/vcspull
.. _cihai-python: https://github.com/cihai/cihai-python
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].