Skip to main content

Configuration helpers (YAML + dotenv layered priority) — standalone module from the SciTeX ecosystem

Project description

scitex-config

PyPI Python Tests Install Test Coverage Docs License: AGPL v3

SciTeX

Configuration + path management with `direct → yaml → env → default` priority cascade.

Full Documentation · pip install scitex-config


Installation

pip install scitex-config

Quick Start

import scitex_config as cfg

config = cfg.get_config()
log_level = config.resolve("logging.level", default="INFO")

paths = cfg.get_paths()
print(paths.cache)            # ~/.scitex/cache

1 Interfaces

Python API
import scitex_config as cfg

# YAML-based (recommended)
config = cfg.get_config()
print(config.MY_KEY)
log_level = config.resolve("logging.level", default="INFO")

# Path resolution
paths = cfg.get_paths()
paths.function_cache       # ~/.scitex/cache/function/...

# Layered priority cascade (direct > yaml > env > default)
pc = cfg.PriorityConfig(yaml_path="config/app.yaml")
db_url = pc.resolve(
    direct=cli_arg,
    key="database.url",
    env_var="DATABASE_URL",
    default="sqlite:///dev.db",
)

Status

Standalone fork of scitex.config. Only dep is PyYAML. The umbrella package's scitex.config import path is preserved via a sys.modules-alias bridge.

Part of SciTeX

scitex-config is part of SciTeX.

Four Freedoms for Research

  1. The freedom to run your research anywhere — your machine, your terms.
  2. The freedom to study how every step works — from raw data to final manuscript.
  3. The freedom to redistribute your workflows, not just your papers.
  4. The freedom to modify any module and share improvements with the community.

AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.

License

AGPL-3.0-only (see LICENSE).


SciTeX

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scitex_config-0.3.2.tar.gz (31.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scitex_config-0.3.2-py3-none-any.whl (33.6 kB view details)

Uploaded Python 3

File details

Details for the file scitex_config-0.3.2.tar.gz.

File metadata

  • Download URL: scitex_config-0.3.2.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scitex_config-0.3.2.tar.gz
Algorithm Hash digest
SHA256 226dcd0176a38c5e380789a745ec921ca0a6f105efe96629dc07ed63feb52063
MD5 c14039cefbebd606f86764459cc8ea25
BLAKE2b-256 6d001794cb1e8e63e4789005328ba7da020fca5fab9f224f23b7c826a1043361

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_config-0.3.2.tar.gz:

Publisher: publish-pypi.yml on ywatanabe1989/scitex-config

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scitex_config-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: scitex_config-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 33.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scitex_config-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 31657efa4323ed950ccdcd61f0a13a9f58c5677a5172c54f1e4f836f79eaf0ff
MD5 0eb4a2a2f36ab4f76f98bbdcda9963aa
BLAKE2b-256 0c80ab2a49b05e0cf5daa477535ce30acf6ecef6d48cc005010c26f27b7bcfb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for scitex_config-0.3.2-py3-none-any.whl:

Publisher: publish-pypi.yml on ywatanabe1989/scitex-config

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page