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

Better app settings management #56

Merged
merged 4 commits into from
Jan 14, 2025
Merged

Better app settings management #56

merged 4 commits into from
Jan 14, 2025

Conversation

mpangrazzi
Copy link
Contributor

@mpangrazzi mpangrazzi commented Jan 14, 2025

With this, I am adding a better app settings management using pydantic-settings and dotenv files.

Now all app settings are centralised in settings.py and they can be provided both as env variables, hayhooks run command args or they can simply be in a .env file (in the same folder where you run hayhooks).

I've also refactored all os.environ usages around the app.

Note: after this, I will add open-webui support as a feature flag.

Extra: I've added an .editorconfig file for better consistency across editors.

Copy link
Member

@vblagoje vblagoje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@mpangrazzi mpangrazzi merged commit 12ebbe3 into main Jan 14, 2025
4 checks passed
@mpangrazzi mpangrazzi deleted the app_settings branch January 14, 2025 15:39
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

Successfully merging this pull request may close these issues.

2 participants