Metadata-Version: 2.1
Name: api-tackle
Version: 0.1
Summary: API Tackle - ...
Home-page: https://github.com/???/api-tackle
Author: bernardt@preakelt.com
Author-email: bernardt@preakelt.com
License: BSD 3-Clause License
Keywords: REST API framework
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Requires-Dist: alembic (==1.4.2)
Requires-Dist: appdirs (==1.4.3)
Requires-Dist: attrs (==19.3.0)
Requires-Dist: certifi (==2020.4.5.1)
Requires-Dist: chardet (==3.0.4)
Requires-Dist: click (==7.1.2)
Requires-Dist: clickclick (==1.2.2)
Requires-Dist: connexion[swagger-ui] (==2.7.0)
Requires-Dist: flask-cors (==3.0.8)
Requires-Dist: flask-migrate (==2.5.3)
Requires-Dist: flask-script (==2.0.6)
Requires-Dist: flask-sqlalchemy (==2.4.1)
Requires-Dist: flask-testing (==0.8.0)
Requires-Dist: flask (==1.1.2)
Requires-Dist: gunicorn (==20.0.4)
Requires-Dist: idna (==2.9)
Requires-Dist: importlib-metadata (==1.6.0)
Requires-Dist: inflection (==0.4.0)
Requires-Dist: itsdangerous (==1.1.0)
Requires-Dist: jinja2 (==2.11.2)
Requires-Dist: jsonschema (==3.2.0)
Requires-Dist: mako (==1.1.2)
Requires-Dist: markupsafe (==1.1.1)
Requires-Dist: openapi-spec-validator (==0.2.8)
Requires-Dist: pip-tools (==5.1.0)
Requires-Dist: prometheus-client (==0.7.1)
Requires-Dist: psycopg2 (==2.8.5)
Requires-Dist: pyrsistent (==0.16.0)
Requires-Dist: python-dateutil (==2.8.1)
Requires-Dist: python-editor (==1.0.4)
Requires-Dist: pyyaml (==5.3.1)
Requires-Dist: requests (==2.23.0)
Requires-Dist: six (==1.14.0)
Requires-Dist: sqlalchemy (==1.3.16)
Requires-Dist: swagger-ui-bundle (==0.0.6)
Requires-Dist: urllib3 (==1.25.9)
Requires-Dist: werkzeug (==1.0.1)
Requires-Dist: wget (==3.2)
Requires-Dist: zipp (==3.1.0)

API Tackle - Simple Python REST API Framework:
**********************************************

Quickstart
----------

.. code-block:: python

    """ WSGI Flask App for production hosting with e.g.: gunicorn --bind 0.0.0.0:80 -w 1 -t 120 wsgi """
    import os
    import logging

    from tackle.flask_utils import create_flask_app  # noqa
    from tackle.flask_utils import setup_logging  # noqa
    from tackle.prometheus_utils import create_prometheus_server  # noqa
    from tackle.rest_api.wrapper_util import add_auth_token  # noqa

    from tropical.rest_api import get_path  # noqa

    create_prometheus_server(9100)

    setup_logging(requested_logging_path='~/.tackle/logs',
                  include_prometheus=True)

    flask_app = create_flask_app(specification_dir=get_path() + '',
                                 add_api=True,
                                 swagger_ui=True,
                                 database_url='sqlite://',
                                 database_create_tables=True,
                                 debug=False)

    # === Add some auth tokens to the DB ===
    add_auth_token('tackleb6-12dd-4104-a7b6-f7d369ff5fec', "Default token e.g. internal hosting.")
    # === ===

    logging.info(f"rest_wsgi_app.py: __name__ == {__name__}")
    application = flask_app.app

    if __name__ == "__main__":
        logging.info(f"rest_wsgi_app.py: __main__ Starting Flask app in Python __main__ .")
        flask_app.run()


Building your own API
---------------------
...



