DocHub prototype - www.lsst.io.generator
## Usage
```python
#/usr/bin/env python
from dochubproto import DocHubProto
p = DocHubProto()
idx = p.render_index()
```
## Environment
`DocHubProto` uses the following environment variables: `KEEPER_URL`,
`LOGLEVEL`, `TEMPLATE_DIR`, `UL_TEMPLATE_NAME`, `IDX_TEMPLATE_NAME`, and
`MAX_DOCUMENT_DATA_AGE`. If those are not specified, the default values
are, respectively, `https://keeper.lsst.codes`, `WARNING`, `templates`
relative to the `dochubproto` module, `doclist.jinja2`, `index.jinja2`,
and `3600` (age is expressed in seconds and must be convertible to a
Python float).
## Methods
* `check_state()` returns one of `STATE_EMPTY`, `STATE_READY`,
`STATE_REFRESHING`, or `STATE_STALE`, which map to the strings
`empty`, `ready`, `refreshing`, or `stale`, respectively. A stale
document is one that has not been updated in more than the maximum
document data age as specified at instance initialization (see above,
default one hour).
* `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`).
* `render()` returns an HTML unordered list entity created from the
document data, encoded as UTF-8. `render_index()` returns an HTML
document created from the document data, encoded as UTF-8.
* `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`.
Metadata
Release files for sqre-dochub-proto 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sqre-dochub-proto-0.0.2.tar.gz | 11.1 kB | Without provenance | Details for sqre-dochub-proto-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sqre_dochub_proto-0.0.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for sqre_dochub_proto-0.0.2-py2.py3-none-any.whl |
Total release size: 24.9 kB
Release files / sqre-dochub-proto-0.0.2.tar.gz
| Download URL | sqre-dochub-proto-0.0.2.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
212e8b40c180ec281469cfe9b9ff33cdf5b884d5b1a4a1b2deb0fa8d0ea2d0a7
|
|
BLAKE2b-256 checksum How to use checksums |
be6c22ad3f3ac44ce9dc1ccf3a5ac0d3d15a9cd06d22451da0187d9326fd3f01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / sqre_dochub_proto-0.0.2-py2.py3-none-any.whl
| Download URL | sqre_dochub_proto-0.0.2-py2.py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
7503f8e9071a84fb34a0b180c1f7c44770cc5e1d5a63e56fa1192f58f581e927
|
|
BLAKE2b-256 checksum How to use checksums |
024cb73cf3930bbc030e433f691156630a62fb95b5bbda5f3e0e9e332d42e39f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for sqre-dochub-proto 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.