
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
app-settings-pydantic
Advanced tools
A simple configuration management package using `pydantic-settings` and `platformdirs`
A simple configuration management package using pydantic-settings
and platformdirs
.
This package allows you to define application settings in a .env
file stored in the user's configuration directory.
platformdirs
pydantic-settings
for settings validation and managementconfigure()
function.save()
method to persist settingspip install app-settings-pydantic
Before using Settings
, you must configure the package with app name and default language.
from app_settings import configure
configure(app_name="my_app", default_language="en")
from app_settings import Settings
settings = Settings()
settings.language = "pl"
settings.save() # Saves to ~/.config/my_app/.env (Linux)
The configuration file is stored in the user config directory provided by platformdirs
, e.g.:
~/.config/<app_name>/.env
~/Library/Application Support/<app_name>/.env
C:\Users\<User>\AppData\Local\<app_name>\.env
Currently, the settings class includes:
language
: Application language (default from configure()
, supports "en" and "pl")If configure()
is not called before accessing Settings
, a RuntimeError
will be raised.
MIT
FAQs
A simple configuration management package using `pydantic-settings` and `platformdirs`
We found that app-settings-pydantic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.