Skip to main content

Build Status PyPI version

Mission

Provide an auto-discovery process of configurations for simple code use. Given a path and a list of pattern, the result config will be a shortcut to any config.

Usage

Setup:

config = mixin(
    path="path/to/my/files",
    patterns=["path/(*)/file.yaml"]
)

Use it:

print config.mynamespace.key

Parameters

  • path

    Initial path to configs. Patterns will be tested against the file structure underneath the path, and it will be ignored in determining the namespacing.

  • patterns

    A list of file paths containing (or not) placeholders "(*)" o find where the configuration files are located. The patterns definition order defines which keys has the priority, the last one being the most relevant.

    Each placeholder in the path will result in a namespace in the resulting config. So let's say you have a pattern

      dir1/(*)/dir2/(*).yaml
    

    If this pattern finds the file : "dir1/ns1/dir2/file.yaml" that contains "key: 'value'", the resulting config will be

      config.ns1.file.key == "value"
    

    now if the pattern was

      dir1/ns1/dir2/file.yaml
    

    for the same file, the resulting config would simply be

      config.key == "value"
    

    so you can use placeholders "(*)" to namespace the resulting config and use "*" without the parenthesis to have a variable path without the namespacing

      dir1/(*)/dir2/*.yaml
      config.ns1.key == "value"
    

Mocking the probing

Your unit test can have your code use fake_probe instead to which to give a dict, and it will appear as if it was just mixed-in. Example:

config = fake_probe({
    "ns1": {
        "file": {
            "key": "value"
        }
    }
})
# then
config.ns1.file.key == "value"

Contributing

Feel free to raise issues and send some pull request, we'll be happy to look at them!

Metadata

Release files for config-mixin 1.0.1

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

Source distribution (sdist)

Source distribution for config-mixin 1.0.1
File Size Uploaded Provenance
config_mixin-1.0.1.tar.gz 10.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for config-mixin 1.0.1
File Interpreter ABI Platform
config_mixin-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.4 kB

Release files / config_mixin-1.0.1.tar.gz

Download URL config_mixin-1.0.1.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b1c028c74041350b783b2ddaa41c2d11e352ffd91c50fea700d6eb776c0a29ff
BLAKE2b-256 checksum
How to use checksums
b71020a8a2180bb862d24f5f9de2957b144702a5770a33e1253838202be800ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 20, 2026.

Transparency log

Release files / config_mixin-1.0.1-py3-none-any.whl

Download URL config_mixin-1.0.1-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c4b0b4950768764e1e147dbca2b688994f097ad74b76471db3ab88ae2365fac
BLAKE2b-256 checksum
How to use checksums
da913b7dd642bd83dbf7b56fa261ffee9c69eb22f8b6ef86ae0508a44ce9377e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 20, 2026.

Transparency log

Security for config-mixin 1.0.1

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 config_mixin-1.0.1.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 Jan 20, 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

1.0.1 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