Metadata-Version: 2.1
Name: fab-quick-start
Version: 0.1.2
Summary: Creates FAB view from model, for an instant multi-page, multi-table app.Apps are multi-page: 1 page per table, with page-page navigation for related data.Pages are multi-table: includes related_views, predictive joins.
Home-page: https://github.com/valhuber/fab-quick-start
Author: Val Huber
Author-email: valjhuber@gmail.com
License: BSD
Project-URL: FAB Quick Start Guide, https://github.com/valhuber/fab-quick-start/wiki
Platform: any
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: ~=3.6
Description-Content-Type: text/x-rst
Requires-Dist: apispec[yaml] (<4,>=3.3)
Requires-Dist: colorama (<1,>=0.3.9)
Requires-Dist: click (<8,>=6.7)
Requires-Dist: email-validator (<2,>=1.0.5)
Requires-Dist: Flask (<2,>=0.12)
Requires-Dist: Flask-Babel (<2,>=1)
Requires-Dist: Flask-Login (<0.5,>=0.3)
Requires-Dist: Flask-OpenID (<2,>=1.2.5)
Requires-Dist: Flask-SQLAlchemy (<3,>=2.4)
Requires-Dist: Flask-WTF (<1,>=0.14.2)
Requires-Dist: Flask-JWT-Extended (<4,>=3.18)
Requires-Dist: jsonschema (<4,>=3.0.1)
Requires-Dist: marshmallow (<4,>=3)
Requires-Dist: marshmallow-enum (<2,>=1.5.1)
Requires-Dist: marshmallow-sqlalchemy (<1,>=0.22.0)
Requires-Dist: python-dateutil (<3,>=2.3)
Requires-Dist: prison (<1.0.0,>=0.1.3)
Requires-Dist: PyJWT (>=1.7.1)
Requires-Dist: sqlalchemy-utils (<1,>=0.32.21)
Provides-Extra: jmespath
Requires-Dist: jmespath (>=0.9.5) ; extra == 'jmespath'

FAB Quick Start Utility - build ``views.py``
============================================

The ``fab-quick-start`` command line utility creates the
`Flask App Builder <https://github.com/dpgaspar/Flask-AppBuilder>`_ ``views.py`` file,
directly from ``models.py``, for an instant multi-page, multi-table app.

Use this `FAB Quick Start Guide <https://github.com/valhuber/fab-quick-start/wiki>`_ 
to create the app shown below in 10 minutes.


Features
--------

Generated fab pages look as shown below:

#. **Multi-page:** apps incude 1 page per table

#. **Multi-table:** pages include ``related_views`` for each related child table, and join in parent data

#. **Favorite field first:** first-displayed field is "name", or `contains` "name" (configurable)

#. **Predictive joins:** favorite field of each parent is shown (product *name* - not product *id*)

#. **Ids last:** such boring fields are not shown on lists, and at the end on other pages

.. image:: https://drive.google.com/uc?export=view&id=1Q3cG-4rQ6Q6RdZppvkrQzCDhDYHnk-F6

Background:
-----------

Flask Application Builder (FAB) provides a rapid means for
building web pages for database apps, based on Python, Flask and sqlalchemy.
Use the Quick Start Guide (link above) to create the application
shown above in 10 minutes.

Recall that creating the ``views.py`` file can be
`tedious. <https://github.com/valhuber/fab-quick-start/wiki#key-fab-inputs-modelspy-and-viewspy>`_
This utility generates the ``views.py`` file from the ``models.py`` file,
to save time and reduce learning curve.

Usage:
------
First, create a fab project (e.g., see the Quick Start Guide).

Then, generate the ``views.py`` file like this::

    cd <project>  # fab directory containing the config.py file
    pip install fab-quick-start
    fab-quick-start run

Copy the console output to your `views.py` file, and run fab / flask app::

    export FLASK_APP=app
    flask run


Parameters
----------
The simple ``run`` command will request 2 parameters, and output to the console.
You can specify parameters and output via command line arguments, like this::

    fab-quick-start run --favorites="name description" --non_favorites="id" > app/views.py

where:

- **favorites:** words() used to find "favorite fields".  Fields named with these words,
  or *containing* these words, are placed at the *start* of lists and show pages.  
  Your values might reflect your language, and your database naming conventions.

- **non_favorites:** name(s) used to find fields to be place 
  at the *end* of list / show pages.

- the `>` pipes the output to a file (which is overwritten).


Depends on:
-----------
- Flask-AppBuilder


More information:
-----------------
The `FAB Quick Start github <https://github.com/valhuber/fab-quick-start#fab-quick-start-utility---build-viewspy>`_ for more information, and explore the code.


Acknowledgements
----------------
Many thanks to

- Daniel Vaz Gaspar, the creator of FAB, for his help and guidance

- Katrina Huber-Juma, for Python help and final review

- Tyler Band, for early testing



Change Log
----------

Initial Version


