Skip to main content

Alchemy Config

The aconfig library provides simple yaml configuration in python with environment-based overrides.

Library advantages

  1. Easily reads environment variables with error handling, e.g. for absence of variables or boolean capitalization
  2. Allows users to easily access and traverse nested configuration without checking for key presence on every access
  3. Automatically handles overriding logic - environment variables take precedence over local configuration files

Installation

To install, simply use pip

pip install alchemy-config

Quick Start

config.yaml

foo: 1
bar:
    baz: "bat"

main.py

import aconfig

if __name__ == "__main__":
    config = aconfig.Config.from_yaml("config.yaml")
    print(config.foo)
    print(config.bar.baz)
export BAR_BAZ="buz"
python3 main.py

Corner-case Behavior

You CAN set builtin method names as attributes on the config. However, you should only access/delete them via dictionary access methods.

For example:

import aconfig
cfg = {"update": True}

config = aconfig.Config(cfg)

# DO NOT DO THIS:
config.update

# DO THIS INSTEAD:
config["update"]

This is because there is no way in Python to tell whether you want the method or the attribute "update" when "getting" it from the object.

Metadata

Release files for alchemy-config 1.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 alchemy-config 1.2.0
File Size Uploaded Provenance Actions
alchemy_config-1.2.0.tar.gz 7.0 kB Without provenance Details for alchemy_config-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for alchemy-config 1.2.0
File Interpreter ABI Platform Actions
alchemy_config-1.2.0-py3-none-any.whl Python 3 none any Details for alchemy_config-1.2.0-py3-none-any.whl

Total release size: 14.4 kB

Release files / alchemy_config-1.2.0.tar.gz

Download URL alchemy_config-1.2.0.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4cb18d2076744750155b510a1ade8bdb3ed61623292b8a6acc85f30a6842eb81
BLAKE2b-256 checksum
How to use checksums
726da24deb3dbc2e0fb16f7e2b4b3fbd9ec68c2812dde2f2f8205302665af9ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / alchemy_config-1.2.0-py3-none-any.whl

Download URL alchemy_config-1.2.0-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b27e6a5782f1e597cfb24744ca7efbbcce22e4723cdbfa9e821e951276a539c
BLAKE2b-256 checksum
How to use checksums
9fa0d91b3e2cc3af68e264c827b3fadfb273ffa044cb1b1e253cecbfb3f0a6a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for alchemy-config 1.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.

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.

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