Skip to main content

Preferences & secrets manager with layered scopes and tuple-key internals

Project description

pysigil

Preference management for small apps.

Quick start

Install pysigil in a virtual environment to make the sigil and pysigil commands available:

python -m venv .venv && source .venv/bin/activate  # Windows: .venv\Scripts\Activate
pip install -e .  # or `pip install .` for a normal install
sigil --help
# or
pysigil --help
# or
python -m pysigil --help
from pysigil.gui.hub import get_preferences
get_pref, set_pref, sigil = get_preferences("pysigil")

Once installed, try a few commands:

sigil set ui.color blue --app demo
sigil get ui.color --app demo
sigil export --app demo

The CLI stores data under your user config directory (e.g. ~/.config/sigil/demo/settings.ini), so you can run these commands right from the source tree without creating a separate project. See tests/manual_tests/README.md for more examples.

Typed helper methods are available for convenient access: Sigil.get_int(), get_float(), get_bool(). For package integration details see docs/integration.md.

Using the GUI

pysigil ships with a simple graphical editor for viewing and editing preferences. After installation launch it with:

sigil gui

Any providers with existing configuration directories (e.g. ~/.config/sigil/user-custom) are automatically listed in the package selector.

To initialise or inspect the user configuration directory from a small helper interface, run:

sigil config gui

Click Initialize User Custom to create a per-host user-custom section. A confirmation dialog appears and the folder opens (e.g. ~/.config/sigil/user-custom) so you can edit the newly created file.

Package authors can register development defaults via:

sigil setup

Or launch it programmatically:

from pysigil.gui import launch_gui
launch_gui()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysigil-0.3.0.tar.gz (33.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysigil-0.3.0-py3-none-any.whl (36.9 kB view details)

Uploaded Python 3

File details

Details for the file pysigil-0.3.0.tar.gz.

File metadata

  • Download URL: pysigil-0.3.0.tar.gz
  • Upload date:
  • Size: 33.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for pysigil-0.3.0.tar.gz
Algorithm Hash digest
SHA256 81e90dae37c7e196565d49e8c107b7cb3c1f5441c23d6e0a1a5e827e461da31d
MD5 7aed4d23ba56e9588d93edf654c970ca
BLAKE2b-256 df374ce96270806922cc70f5ba8ddf48648558cd5eab02e616d01e30d8e92264

See more details on using hashes here.

File details

Details for the file pysigil-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pysigil-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 36.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for pysigil-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5cf9a2522227dd826427012f91c7575db6426035c0f175025ea34640cf4659dc
MD5 55cd85a642ce16730a492f27d44a435b
BLAKE2b-256 d7ba7771713e62d93feea2ba0abe6e1d91326bc2ea7273f69c99dc457ac7e601

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page