HBNetwork / python-decouple

Strict separation of config from code.
MIT License
2.79k stars 192 forks source link

Custom Config Loaders #108

Closed aaronclong closed 3 years ago

aaronclong commented 3 years ago

I wonder if a custom config source could be added through an external library that acts as an extension. There are cases where these values come from through from AWS Secretes Manager, Vault, or Consul, and this library doesn't support those mechanisms.

If a standard interface could be designed with a way to register it, it could be pretty powerful!!

henriquebastos commented 3 years ago

You mean register custom repositories so the data source would change from a .env file to something else?

This would have to be consistent with env variables overwrite.

henriquebastos commented 3 years ago

You can use the Repository base class to implement your own.