Skip to main content

ingot-settings

ci License

Sources and formats for the settings of Ingots beyond the standard library: an addon extending the settings unit of ingots.defaults. First YAML files, then loaders for cloud secret managers. Every integration is a unit behind an extra of its own, and nothing is wired in by default: an application installs the extras it uses and joins their settings with its own.

from ingot_settings.yaml import YamlSettings  # pip install "ingot-settings[yaml]"
from ingots.defaults import Project
from ingots.puer import Slot


class AppSettings(HttpSettings, YamlSettings):
    pass


class AppProject(Project):
    env_configs_prefix = "APP"
    settings = Slot(AppSettings)

Importing a unit without its extra fails at once, naming the extra.

YAML files

ingot_settings.yaml, the yaml extra: YamlSettings read --configs-file in YAML too (.yaml, .yml), next to INI and JSON: a mapping of config names to values.

HTTP_HOST: example.com
HTTP_PORT: 9090
IS_STRICT_CONFIGS: true

The file is read with the base loader of PyYAML, which resolves no types: every scalar is a string, converted by its config as an environment variable is. NO stays "NO" for a string config and is a false for a bool one; the booleans, octals and dates of YAML 1.1 do not apply. A sequence or a mapping reaches its config as a list or a dict, which the config rejects unless it converts them: such an override is wrong. A tag (!!int, !!python/object) and a key given twice are errors. An alias may repeat a scalar, HOST: &host db.internal then OTHER_HOST: *host, but not a sequence or a mapping, which would nest into data exponentially larger than the file (billion laughs); the aliases together may repeat at most as many characters as the file holds.

Joining units

Units that extend different slots join as they are. Two that extend the same one, such as two file loaders with formats of their own, take a class extending both: ingots (and mypy) reject the settings until they declare it.

class AppFileLoader(YamlFileLoader, TomlFileLoader):
    pass


class AppSettings(YamlSettings, TomlSettings):
    file_loader = Slot(AppFileLoader)

Status: pre-alpha: YAML files.

Development

Requires uv and make; uv fetches the interpreters it needs.

make                 # the target list
make check           # everything CI runs: lint, test, coverage, wheel-test, cl-check
make format          # black
make all             # build the sdist and the wheel into dist/
  • Every change users should know about adds a news fragment to changelog.d/ (see its README).
  • A release is a pull request setting the version (uv version X.Y.Z) and collating the changelog (make cl-build VERSION=X.Y.Z), then the tag vX.Y.Z on main: the release workflow publishes the tested build to TestPyPI, then to PyPI. Run by hand, it rehearses on TestPyPI only.

License

Apache 2.0.

Metadata

Release files for ingot-settings 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ingot-settings 0.2.0
File Size Uploaded Provenance
ingot_settings-0.2.0.tar.gz 10.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ingot-settings 0.2.0
File Interpreter ABI Platform
ingot_settings-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.6 kB

Release files / ingot_settings-0.2.0.tar.gz

Download URL ingot_settings-0.2.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9dbce7327a7d15dea41219b7a20826c8ee290947f8fbbbe914f5598318ee3d34
BLAKE2b-256 checksum
How to use checksums
6ef61d1eb42288a5a97e56048c5252e2d90c3adb96ce53d00c7e47d42efd4955
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Release files / ingot_settings-0.2.0-py3-none-any.whl

Download URL ingot_settings-0.2.0-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b6dfa0ed4147c551f89448de97615241ffb4ae5417d1b00775ebe1f72ed3834
BLAKE2b-256 checksum
How to use checksums
21860ad7a6286f53c634dd972a0f43f5f6c45d2ca2a7b3a8f0dbc38b2fbe811d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Security for ingot-settings 0.2.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ingot_settings-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page