Configuration

Most readers can skip this page. The defaults work for typical interactive use. Come here only if you need to change a timeout or adjust download behaviour — for example, to increase the server timeout for a slow connection you can pass NEIDArchive(timeout=120), or hand the archive a Conf carrying several settings at once: NEIDArchive(conf=Conf(timeout=120, download_workers=8)). Conf is immutable, so you construct one rather than mutating it. The reference below documents every available setting.

class nexsci_rv.config.Conf(timeout=60.0, download_workers=4, download_retries=3, cookie_root=<factory>)

Bases: object

Immutable configuration record.

Construct a new Conf (rather than mutating) when overrides are needed, e.g. Conf(timeout=120, cookie_root=Path('/tmp/cookies')).

Parameters:
  • timeout (float)

  • download_workers (int)

  • download_retries (int)

  • cookie_root (Path)

classmethod from_env()

Build a Conf populated from NEXSCI_RV_* environment variables.

Unset variables fall back to the dataclass defaults.

Return type:

Conf

nexsci_rv.config.conf

The default Conf instance, populated from environment variables.

Library code that needs a default should import conf from this module rather than constructing its own.