Skip to content

Support plugins to customize functionality  #15

@rsyring

Description

@rsyring

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions