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 import (
get_project_directory,
get_user_directory,
helpers_for,
)
get_setting, set_setting = helpers_for("pysigil")
project_root = get_project_directory("pysigil")
user_data = get_user_directory("pysigil")
get_setting("ui.color")
set_setting("ui.color", "blue")
# e.g. load a template shipped with the package
(project_root / "templates" / "dialog.ui").read_text()
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.
Policy API
The merge order and write permissions are managed by a configurable
ScopePolicy. The default policy prefers project settings over user ones.
To inspect or extend the policy:
from pysigil.policy import Scope, ScopePolicy, policy
# clone and add a git-tracked scope
scopes = [*policy._scopes, Scope("git", writable=True)]
git_policy = ScopePolicy(scopes)
# precedence can be switched at runtime
policy.set_store("user", {("pysigil", "policy"): "user_over_project"})
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 register # alias: `sigil setup`
Launch authoring tools without the editor:
sigil author
Or launch it programmatically:
from pysigil.ui.tk import launch
launch()
Metadata
Release files for pysigil 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pysigil-0.6.0.tar.gz | 111.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pysigil-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 220.7 kB
Release files / pysigil-0.6.0.tar.gz
| Download URL | pysigil-0.6.0.tar.gz |
|---|---|
| Size | 111.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bff690d4d772caea9932b8703858fd11e0dc99fa048c0bcbf04d54db08953d40
|
|
BLAKE2b-256 checksum How to use checksums |
0ea39341427cef989b285df9670000ea037f836f352e0f17e29c37333ed2a9a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.5
|
Release files / pysigil-0.6.0-py3-none-any.whl
| Download URL | pysigil-0.6.0-py3-none-any.whl |
|---|---|
| Size | 109.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a0af8c8da34b4d510a92535f4eb052e6d46d8f6d67598ab9fa4fcdd91965bde
|
|
BLAKE2b-256 checksum How to use checksums |
b64ba54c4958061c6f8b78a792a415166396e7b8fb0ca5c0fa71b411d50ebb8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.5
|
Security for pysigil 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.