Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support plugins to customize functionality #15

Open
rsyring opened this issue Jan 13, 2025 · 0 comments
Open

Support plugins to customize functionality #15

rsyring opened this issue Jan 13, 2025 · 0 comments

Comments

@rsyring
Copy link
Member

rsyring commented Jan 13, 2025

Resolving an environment variable is done through a Resolver class.

We could add support for loading other Resolver classes through installed Python packages and/or module paths. E.g.:

resolvers:
  # This is a project name.  The resolver module path is read from the project's meta data.
  - env-config-bitwarden
  # This is a module path so resolvers can be loaded without installing a package.
  - myproj.libs.env_config:CustomResolver
profile:
  foo:
    # URL format isn't required, since Resolvers identify values they can resolver.  Obviously,
    # for this to work, env-config-bitwarden would need a resolver that can handle "bitwarden://"
    # paths.
    bar: 'bitwarden://work/myproj/bar'
    # And the custom resolver handles these
    baz: 'myproj://baz'

My guess is we'd use pluggy and can use pytest as an inspiration for how to integrate plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant