Team-TAU / tau

TAU- Twitch API Unifier, a containerized relay/proxy to unify the WebHook- and WebSocket-based real-time Twitch APIs under a single (local) WebSocket connection.
MIT License
149 stars 38 forks source link

[FEAT] Use configuration validation patterns for environment based config #125

Open belthesar opened 1 year ago

belthesar commented 1 year ago

Is your feature request related to a problem? Please describe. TAU currently assumes that configuration received via environment variables will match the intended behavior. This can lead to silent failures, especially when deploying outside of application defaults, which assume a local deploy with Ngrok.

Describe the solution you'd like In support of good documentation in both code and readmes, TAU should validate config, and raise exceptions as needed to inform the user deploying TAU of any issues where config is not in spec.

Describe alternatives you've considered Documentation alone could be used to handle this in lieu of validating config, but will lead to silent errors / magic behavior.

Additional context Consider using django-environ and/or environs to handle environment variable parsing instead of the existing use of os.environ