pverbs 0.1.0__tar.gz

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.
pverbs-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Patrick Beam
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
pverbs-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,44 @@
1
+ Metadata-Version: 2.4
2
+ Name: pverbs
3
+ Version: 0.1.0
4
+ Summary: Explicit, named constraints for more verifiable agent-written code
5
+ Author: Patrick Beam
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/antimemeai/verbs
8
+ Project-URL: Repository, https://github.com/antimemeai/verbs
9
+ Project-URL: Issues, https://github.com/antimemeai/verbs/issues
10
+ Keywords: constraints,validation,agents,contracts
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3 :: Only
14
+ Classifier: Typing :: Typed
15
+ Requires-Python: >=3.10
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Dynamic: license-file
19
+
20
+ # Verbs for Python
21
+
22
+ ```python
23
+ from pverbs import check
24
+ retries = check("bounded retries", 3, lambda n: 1 <= n <= 5)
25
+ ```
26
+
27
+ `check` evaluates a synchronous predicate once and returns the original value
28
+ only for the boolean `True`; otherwise it raises `Violation` with a `constraint`
29
+ attribute. Predicate exceptions propagate. Later mutation can invalidate a check.
30
+ No runtime dependencies. Python 3.10 or newer.
31
+
32
+ Distribution and import name: `pverbs`, selected by the operator. `pyverbs` is
33
+ an unrelated published package. The initial API is experimental and MIT licensed.
34
+
35
+ Install with `pip install pverbs` after publication. From this directory,
36
+ `python -m unittest -v test_verbs` checks the source. From the repository root,
37
+ `uv build packages/python --out-dir packages/python/dist` builds the source
38
+ distribution and wheel, using setuptools as a build-only dependency.
39
+ There are no runtime or test dependencies beyond the Python standard library.
40
+
41
+ `python scripts/publish.py pypi` publishes the prepared files using the pypi
42
+ credential from ~/projects/.env. The utility passes the credential through the
43
+ child environment and does not persist it in this repository. Use --dry-run
44
+ to check the upload preparation without publishing.
pverbs-0.1.0/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # Verbs for Python
2
+
3
+ ```python
4
+ from pverbs import check
5
+ retries = check("bounded retries", 3, lambda n: 1 <= n <= 5)
6
+ ```
7
+
8
+ `check` evaluates a synchronous predicate once and returns the original value
9
+ only for the boolean `True`; otherwise it raises `Violation` with a `constraint`
10
+ attribute. Predicate exceptions propagate. Later mutation can invalidate a check.
11
+ No runtime dependencies. Python 3.10 or newer.
12
+
13
+ Distribution and import name: `pverbs`, selected by the operator. `pyverbs` is
14
+ an unrelated published package. The initial API is experimental and MIT licensed.
15
+
16
+ Install with `pip install pverbs` after publication. From this directory,
17
+ `python -m unittest -v test_verbs` checks the source. From the repository root,
18
+ `uv build packages/python --out-dir packages/python/dist` builds the source
19
+ distribution and wheel, using setuptools as a build-only dependency.
20
+ There are no runtime or test dependencies beyond the Python standard library.
21
+
22
+ `python scripts/publish.py pypi` publishes the prepared files using the pypi
23
+ credential from ~/projects/.env. The utility passes the credential through the
24
+ child environment and does not persist it in this repository. Use --dry-run
25
+ to check the upload preparation without publishing.
@@ -0,0 +1,25 @@
1
+ """Explicit, named synchronous constraints; checked at the time of the call."""
2
+
3
+ from collections.abc import Callable
4
+ from typing import TypeVar
5
+
6
+ __all__ = ["Violation", "check"]
7
+ T = TypeVar("T")
8
+
9
+
10
+ class Violation(ValueError):
11
+ """A predicate rejected a value, identified only by its constraint name."""
12
+
13
+ def __init__(self, constraint: str) -> None:
14
+ self.constraint = constraint
15
+ super().__init__(f"constraint violated: {constraint}")
16
+
17
+
18
+ def check(name: str, value: T, predicate: Callable[[T], bool]) -> T:
19
+ """Evaluate once; return the original value only for the boolean True.
20
+
21
+ Predicate exceptions propagate. Later mutation can invalidate the constraint.
22
+ """
23
+ if predicate(value) is not True:
24
+ raise Violation(name)
25
+ return value
File without changes
@@ -0,0 +1,44 @@
1
+ Metadata-Version: 2.4
2
+ Name: pverbs
3
+ Version: 0.1.0
4
+ Summary: Explicit, named constraints for more verifiable agent-written code
5
+ Author: Patrick Beam
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/antimemeai/verbs
8
+ Project-URL: Repository, https://github.com/antimemeai/verbs
9
+ Project-URL: Issues, https://github.com/antimemeai/verbs/issues
10
+ Keywords: constraints,validation,agents,contracts
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3 :: Only
14
+ Classifier: Typing :: Typed
15
+ Requires-Python: >=3.10
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Dynamic: license-file
19
+
20
+ # Verbs for Python
21
+
22
+ ```python
23
+ from pverbs import check
24
+ retries = check("bounded retries", 3, lambda n: 1 <= n <= 5)
25
+ ```
26
+
27
+ `check` evaluates a synchronous predicate once and returns the original value
28
+ only for the boolean `True`; otherwise it raises `Violation` with a `constraint`
29
+ attribute. Predicate exceptions propagate. Later mutation can invalidate a check.
30
+ No runtime dependencies. Python 3.10 or newer.
31
+
32
+ Distribution and import name: `pverbs`, selected by the operator. `pyverbs` is
33
+ an unrelated published package. The initial API is experimental and MIT licensed.
34
+
35
+ Install with `pip install pverbs` after publication. From this directory,
36
+ `python -m unittest -v test_verbs` checks the source. From the repository root,
37
+ `uv build packages/python --out-dir packages/python/dist` builds the source
38
+ distribution and wheel, using setuptools as a build-only dependency.
39
+ There are no runtime or test dependencies beyond the Python standard library.
40
+
41
+ `python scripts/publish.py pypi` publishes the prepared files using the pypi
42
+ credential from ~/projects/.env. The utility passes the credential through the
43
+ child environment and does not persist it in this repository. Use --dry-run
44
+ to check the upload preparation without publishing.
@@ -0,0 +1,9 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ pverbs/__init__.py
5
+ pverbs/py.typed
6
+ pverbs.egg-info/PKG-INFO
7
+ pverbs.egg-info/SOURCES.txt
8
+ pverbs.egg-info/dependency_links.txt
9
+ pverbs.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ pverbs
@@ -0,0 +1,32 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "pverbs"
7
+ version = "0.1.0"
8
+ description = "Explicit, named constraints for more verifiable agent-written code"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ authors = [{name = "Patrick Beam"}]
14
+ keywords = ["constraints", "validation", "agents", "contracts"]
15
+ classifiers = [
16
+ "Development Status :: 3 - Alpha",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3 :: Only",
19
+ "Typing :: Typed",
20
+ ]
21
+ dependencies = []
22
+
23
+ [project.urls]
24
+ Homepage = "https://github.com/antimemeai/verbs"
25
+ Repository = "https://github.com/antimemeai/verbs"
26
+ Issues = "https://github.com/antimemeai/verbs/issues"
27
+
28
+ [tool.setuptools]
29
+ packages = ["pverbs"]
30
+
31
+ [tool.setuptools.package-data]
32
+ pverbs = ["py.typed"]
pverbs-0.1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+