Metadata-Version: 2.1
Name: bl-hector
Version: 0.1.0a6
Summary: A collection manager.
License: AGPL-3.0-or-later
Author: Tanguy Le Carrour
Author-email: tanguy@bioneland.org
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.9
Provides-Extra: totp
Provides-Extra: webauthn
Requires-Dist: Flask (>=2.3.2,<3.0.0)
Requires-Dist: SQLAlchemy (>=2.0.15,<3.0.0)
Requires-Dist: bl-seth (>=0.1.2,<0.2.0)
Requires-Dist: bl3d (>=0.3.0,<0.4.0)
Requires-Dist: fluent.runtime (>=0.4.0,<0.5.0)
Requires-Dist: isbnlib (>=3.10.14,<4.0.0)
Requires-Dist: jinja2-fragments (>=0.3.0,<0.4.0)
Requires-Dist: pyotp (>=2.8.0,<3.0.0)
Requires-Dist: pypugjs (>=5.9.12,<6.0.0)
Requires-Dist: requests (>=2.31.0,<3.0.0)
Requires-Dist: typer (>=0.9.0,<0.10.0)
Requires-Dist: webauthn (>=1.8.1,<2.0.0); extra == "webauthn"
Description-Content-Type: text/markdown

# Hector — a collection manager

## Install

For the time being, Hector cannot be installed from PyPI.
See [CONTRIBUTING.md]() to set up a development environment.


## Configure

Hector is configured using environment variables.
All the variable names are prefixed with `HECTOR_`.

```console
$ export HECTOR_SECRET_KEY="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
$ export HECTOR_DSN="sqlite:///data.sqlite"
```

The secret can be generated using the `token_hex()` function from
the Python's `secrets` module.

Additional Python database drivers might be required depending on the DSN.

See [the `settings` module](bl_hector/infrastructure/settings.py) for
a comprehensive list of configuration variables.


## Authentication

To enable WebAuthn authentication, you must install extra dependencies (`bl-hector[webauthn]`)
and enable it explicitly:

```console
$ export HECTOR_WEBAUTHN=1
```

To enable TOTP authentication, you must install extra dependencies (`bl-hector[totp]`)
and enable it explicitly by setting a base32 random secret (`pyotp.random_base32()`):

```console
$ export HECTOR_TOTP=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

## Initialise

Once configured, you must initialise Hector's database with the dedicated command:

```console
$ hector init-db
```


## Run

Hector being a Flask application, it can be run using any WSGI server,
for instance, with [Gunicorn](https://gunicorn.org):

```console
$ gunicorn --access-logfile="-" -w 4 -b 127.0.0.1:3000 "bl_hector.configuration.wsgi:app()"
```

