{ "info": { "author": "Adam Thornton", "author_email": "athornton@lsst.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.5" ], "description": "#####################\nLSST DocHub Prototype\n#####################\n\n.. image:: https://img.shields.io/pypi/v/lsst-dochub-prototype.svg\n :target: https://pypi.python.org/pypi/lsst-dochub-prototype\n :alt: Python Package Index\n.. image:: https://img.shields.io/travis/lsst-sqre/dochub-prototype.svg?branch=master\n :target: https://travis-ci.org/lsst-sqre/dochub-prototype\n :alt: Travis CI build status\n\nPrototype of LSST DocHub (`www.lsst.io`_) as a static website generator.\n\nUsage\n=====\n\n::\n\n #/usr/bin/env python\n from dochubproto import DocHubProto\n\n p = DocHubProto()\n idx = p.render_index()\n\nConfiguration\n=============\n\n``DocHubProto`` uses the following environment variables:\n\n- ``KEEPER_URL`` (default ``https://keeper.lsst.codes``).\n- ``LOGLEVEL`` (default ``WARNING``).\n- ``TEMPLATE_DIR``: directory containing Jinja2 templates (default ``templates``).\n- ``UL_TEMPLATE_NAME``: relative path to template for individual document items (default ``doclist.jinja2``).\n- ``IDX_TEMPLATE_NAME``: relative path to the ``index.html`` template (default ``index.jinja2``).\n- ``MAX_DOCUMENT_DATA_AGE``: maximum cache age in seconds of a document (default ``3600``).\n\nDocHubProto API overview\n========================\n\n- ``check_state()`` returns one of:\n\n - ``STATE_EMPTY`` (``'empty'``)\n - ``STATE_READY`` (``'ready'``)\n - ``STATE_REFRESHING`` (``'refreshing'``)\n - ``STATE_STALE`` (``'stale'``)\n\n A document is 'stale' if it is older than ``MAX_DOCUMENT_DATA_AGE``.\n\n- ``get_document_data()`` and ``get_fresh_document_data()`` return a ``dict`` whose keys are document sections (e.g. ``DMTN``) and within each section, a list ordered by document handle (e.g. ``dmtn-038``).\n\n- ``render()`` returns an HTML unordered list entity created from the document data, encoded as UTF-8.\n\n- ``render_index()`` returns an HTML document created from the document data, encoded as UTF-8.\n\n- ``debug()``, ``info()``, ``warning()``, ``error()``, and ``critical()`` each log a message at the specified level; it uses a `structlog`_ logger to log JSON output via `apikit`_.\n\n.. _apikit: https://github.com/lsst-sqre/sqre-apikit\n.. _structlog: https://structlog.readthedocs.io/en/stable/\n.. _`www.lsst.io`: https://www.lsst.io", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sqre-lsst/dochub-prototype", "keywords": "lsst", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "lsst-dochub-proto", "package_url": "https://pypi.org/project/lsst-dochub-proto/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/lsst-dochub-proto/", "project_urls": { "Homepage": "https://github.com/sqre-lsst/dochub-prototype" }, "release_url": "https://pypi.org/project/lsst-dochub-proto/0.0.2/", "requires_dist": null, "requires_python": null, "summary": "Prototype of LSST DocHub as a static website generator", "version": "0.0.2" }, "last_serial": 2726764, "releases": { "0.0.2": [] }, "urls": [] }