fuckface (0.2.0)
Published 2026-07-24 17:47:14 +00:00 by Jack
Installation
pip install --index-url fuckfaceAbout this package
JSON settings that behave—unless you tell them to be a brat.
fuckface
A small JSON-backed settings module.
from fuckface import Settings, SharedSettings
settings = Settings("settings.json")
settings.set("theme", "dark")
settings["volume"] = 75
settings.save()
# Replace the current in-memory values with the file contents at any time.
settings.read()
# Enable brat mode for compact, one-line JSON:
compact_settings = Settings("compact.json", be_a_brat=True)
compact_settings.set("theme", "dark")
compact_settings.save()
# Pretty, indented JSON is the default:
pretty_settings = Settings("pretty.json", be_a_brat=False)
# Create/configure the shared instance before its first use.
shared = SharedSettings("shared-settings.json")
@SharedSettings.subscribe("theme")
def setting_theme_changed(old, new):
print(f"theme changed from {old!r} to {new!r}")
shared.set("theme", "light")
shared.save()
SharedSettings() always returns the same instance within the process. Create
it with the desired path before using its class-level subscribe decorator.
Initialized by Hyperpyemia 0.3.4
Requirements
Requires Python: >=3.10
Details
2026-07-24 17:47:14 +00:00
Assets (2)
Versions (2)
View all
PyPI
1
9.2 KiB
fuckface-0.2.0-py3-none-any.whl
4.0 KiB
fuckface-0.2.0.tar.gz
5.2 KiB