How to use the dtale.cli.clickutils.retrieve_meta_info_and_version function in dtale

To help you get started, we’ve selected a few dtale examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github man-group / dtale / dtale / app.py View on Github external
:return: :class:`flask:flask.Flask` application
    :rtype: :class:`dtale.app.DtaleFlask`
    """

    app = DtaleFlask('dtale', reaper_on=reaper_on, static_url_path='', url=url)
    app.config['SECRET_KEY'] = 'Dtale'
    app.config['HIDE_SHUTDOWN'] = hide_shutdown

    app.jinja_env.trim_blocks = True
    app.jinja_env.lstrip_blocks = True
    app.register_blueprint(dtale)

    compress = Compress()
    compress.init_app(app)

    _, version = retrieve_meta_info_and_version('dtale')
    template = dict(
        info={
            'title': 'D-Tale',
            'version': version,
            'description': 'Web Client for Visualizing Pandas Objects',
            'contact': {
                'name': 'Man Alpha Technology',
                'email': 'ManAlphaTech@man.com',
                'url': 'https://github.com/man-group/dtale'
            },
        },
        host=get_host(host),
        schemes=['http'],
    )
    try:
        from flasgger import Swagger  # flake8: NOQA
github man-group / dtale / dtale / views.py View on Github external
def base_render_template(template, data_id, **kwargs):
    """
    Overriden version of Flask.render_template which will also include vital instance information
     - settings
     - version
     - processes
    """
    curr_settings = SETTINGS.get(data_id, {})
    _, version = retrieve_meta_info_and_version('dtale')
    return render_template(
        template,
        data_id=data_id,
        settings=json.dumps(curr_settings),
        version=str(version),
        processes=len(DATA),
        **kwargs
    )
github man-group / dtale / dtale / app.py View on Github external
def version_info():
        """
        :class:`flask:flask.Flask` route for retrieving version information about D-Tale

        :return: text/html version information
        """
        _, version = retrieve_meta_info_and_version('dtale')
        return str(version)