shcl 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,79 @@
1
+ Metadata-Version: 2.4
2
+ Name: shcl
3
+ Version: 1.0.0
4
+ Summary: SHCL - Simple Hierarchical Config Language. Parser, accessor, writer, and formatter.
5
+ Author: Jim Collier
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/jim-collier/shcl
8
+ Project-URL: Source, https://github.com/jim-collier/shcl
9
+ Project-URL: Issues, https://github.com/jim-collier/shcl/issues
10
+ Project-URL: Changelog, https://github.com/jim-collier/shcl/blob/main/changelog.md
11
+ Keywords: config,configuration,parser,shcl
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Topic :: Text Processing :: General
22
+ Requires-Python: >=3.9
23
+ Description-Content-Type: text/markdown
24
+
25
+ # shcl
26
+
27
+ **S**imple **H**ierarchical **C**onfig **L**anguage. Forgiving to write, predictable to read.
28
+
29
+ Values are stored as plain text and coerced only when *your* code asks for a type, so a config file can never silently decide that `NO` means `false`. A bad line is skipped or repaired with a diagnostic instead of taking down the whole file.
30
+
31
+ Pure standard library, no dependencies, one module. Held byte-for-byte against the Rust reference by a shared conformance corpus.
32
+
33
+ ## Install
34
+
35
+ ```sh
36
+ pip install shcl
37
+ ```
38
+
39
+ ## Use
40
+
41
+ ```python
42
+ from shcl import Document, Status
43
+
44
+ with open("server.shcl", encoding="utf-8") as f:
45
+ doc = Document.parse(f.read())
46
+
47
+ # One call, a typed value, a visible fallback at the call site.
48
+ limit = doc.get_int("site[example.com].max-upload-mb", default=10)
49
+
50
+ # Or ask why a read failed: Good, Empty, NotFound, BadType, Multiple.
51
+ r = doc.read_int("site[example.com].max-upload-mb")
52
+ if r.status is not Status.Good:
53
+ print(r.status, r.raw)
54
+
55
+ # Wildcards read across instances, with a status per slot.
56
+ roots = doc.read_string_array("site[*].root")
57
+ ```
58
+
59
+ `Document.parse` never raises. When you want a hard error instead, use `Document.parse_with(text, Strictness.Strict)`, which raises `LoadError`. A `get_*` call with no `default=` raises `StatusError` rather than inventing a value.
60
+
61
+ Also here: `merge` for layered config (defaults, site, user), `validate` against a schema that is itself a SHCL file, a full writer, and a canonical formatter that preserves comments.
62
+
63
+ Python 3.9 or newer.
64
+
65
+ ## Compatibility
66
+
67
+ Bindings are versioned in lockstep, so `1.x` is the same behavior in every language. `shcl~=1.0` picks up minor and patch releases on its own and never crosses a major version.
68
+
69
+ ## The CLI
70
+
71
+ This package is the library only. The `shcl` command ships as a prebuilt binary and as `.deb`/`.rpm`/Windows packages - see <https://github.com/jim-collier/shcl>.
72
+
73
+ ## Docs
74
+
75
+ Language spec, formal grammar, and the other bindings: <https://github.com/jim-collier/shcl>
76
+
77
+ ## License
78
+
79
+ MIT. SHCL™ is a trademark of Jim Collier - see the [trademark policy](https://github.com/jim-collier/shcl/blob/main/trademark.md).
@@ -0,0 +1,5 @@
1
+ shcl.py,sha256=GvJXrDiK3jTMMspDciWEJi_OyFndtT3VYprPDCkuPQs,93285
2
+ shcl-1.0.0.dist-info/METADATA,sha256=HShQWI_ONl9aQIlTM561Yc5WxY1VGkMWtwZhUPNmvtU,3211
3
+ shcl-1.0.0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
4
+ shcl-1.0.0.dist-info/top_level.txt,sha256=ZIyl1Irkw27rCfNPvpmAwNbLZz97ox855CE6-UCSvWI,5
5
+ shcl-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (83.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ shcl