langchain-human-in-the-loop 0.0.1__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 CodeVF LLC
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.
@@ -0,0 +1,53 @@
1
+ Metadata-Version: 2.4
2
+ Name: langchain-human-in-the-loop
3
+ Version: 0.0.1
4
+ Summary: Utilities for adding human fallback flows to LangChain apps.
5
+ Author: CodeVF LLC
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/codevfllc/langchain-human-in-the-loop
8
+ Project-URL: Repository, https://github.com/codevfllc/langchain-human-in-the-loop
9
+ Project-URL: Issues, https://github.com/codevfllc/langchain-human-in-the-loop/issues
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Python: >=3.8
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Dynamic: license-file
24
+
25
+ # langchain-human-in-the-loop
26
+
27
+ `langchain-human-in-the-loop` is a small Python package scaffold for human-in-the-loop fallback patterns in LangChain-style applications.
28
+
29
+ ## Install (local)
30
+
31
+ ```bash
32
+ python3 -m pip install -e .
33
+ ```
34
+
35
+ ## Build package artifacts
36
+
37
+ ```bash
38
+ python3 -m pip install --upgrade build
39
+ python3 -m build
40
+ ```
41
+
42
+ This creates:
43
+ - `dist/langchain_human_in_the_loop-<version>.tar.gz`
44
+ - `dist/langchain_human_in_the_loop-<version>-py3-none-any.whl`
45
+
46
+ ## Publish to PyPI
47
+
48
+ ```bash
49
+ python3 -m pip install --upgrade twine
50
+ python3 -m twine upload dist/*
51
+ ```
52
+
53
+ Tip: publish once ASAP with this name to claim it, then iterate on functionality in later releases.
@@ -0,0 +1,29 @@
1
+ # langchain-human-in-the-loop
2
+
3
+ `langchain-human-in-the-loop` is a small Python package scaffold for human-in-the-loop fallback patterns in LangChain-style applications.
4
+
5
+ ## Install (local)
6
+
7
+ ```bash
8
+ python3 -m pip install -e .
9
+ ```
10
+
11
+ ## Build package artifacts
12
+
13
+ ```bash
14
+ python3 -m pip install --upgrade build
15
+ python3 -m build
16
+ ```
17
+
18
+ This creates:
19
+ - `dist/langchain_human_in_the_loop-<version>.tar.gz`
20
+ - `dist/langchain_human_in_the_loop-<version>-py3-none-any.whl`
21
+
22
+ ## Publish to PyPI
23
+
24
+ ```bash
25
+ python3 -m pip install --upgrade twine
26
+ python3 -m twine upload dist/*
27
+ ```
28
+
29
+ Tip: publish once ASAP with this name to claim it, then iterate on functionality in later releases.
@@ -0,0 +1,38 @@
1
+ [build-system]
2
+ requires = ["setuptools>=69", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "langchain-human-in-the-loop"
7
+ version = "0.0.1"
8
+ description = "Utilities for adding human fallback flows to LangChain apps."
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ authors = [
12
+ { name = "CodeVF LLC" }
13
+ ]
14
+ license = { text = "MIT" }
15
+ classifiers = [
16
+ "Development Status :: 3 - Alpha",
17
+ "Intended Audience :: Developers",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3 :: Only",
21
+ "Programming Language :: Python :: 3.8",
22
+ "Programming Language :: Python :: 3.9",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
26
+ ]
27
+ dependencies = []
28
+
29
+ [project.urls]
30
+ Homepage = "https://github.com/codevfllc/langchain-human-in-the-loop"
31
+ Repository = "https://github.com/codevfllc/langchain-human-in-the-loop"
32
+ Issues = "https://github.com/codevfllc/langchain-human-in-the-loop/issues"
33
+
34
+ [tool.setuptools]
35
+ package-dir = { "" = "src" }
36
+
37
+ [tool.setuptools.packages.find]
38
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ from .fallback import HumanFallbackConfig, with_human_fallback
2
+
3
+ __all__ = ["HumanFallbackConfig", "with_human_fallback"]
@@ -0,0 +1,36 @@
1
+ from dataclasses import dataclass
2
+ from typing import Any, Callable, Optional
3
+
4
+
5
+ @dataclass(frozen=True)
6
+ class HumanFallbackConfig:
7
+ """Configuration used by `with_human_fallback`."""
8
+
9
+ enabled: bool = True
10
+ reason: str = "fallback requested"
11
+
12
+
13
+ def with_human_fallback(
14
+ primary_handler: Callable[..., Any],
15
+ human_handler: Callable[..., Any],
16
+ *,
17
+ config: Optional[HumanFallbackConfig] = None,
18
+ ) -> Callable[..., Any]:
19
+ """
20
+ Wrap `primary_handler` with a human fallback.
21
+
22
+ If the primary handler raises an exception and fallback is enabled,
23
+ the human handler is called with the original args/kwargs plus
24
+ `error=<exception>`.
25
+ """
26
+ cfg = config or HumanFallbackConfig()
27
+
28
+ def wrapped(*args: Any, **kwargs: Any) -> Any:
29
+ try:
30
+ return primary_handler(*args, **kwargs)
31
+ except Exception as exc: # pragma: no cover
32
+ if not cfg.enabled:
33
+ raise
34
+ return human_handler(*args, **kwargs, error=exc)
35
+
36
+ return wrapped
@@ -0,0 +1,53 @@
1
+ Metadata-Version: 2.4
2
+ Name: langchain-human-in-the-loop
3
+ Version: 0.0.1
4
+ Summary: Utilities for adding human fallback flows to LangChain apps.
5
+ Author: CodeVF LLC
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/codevfllc/langchain-human-in-the-loop
8
+ Project-URL: Repository, https://github.com/codevfllc/langchain-human-in-the-loop
9
+ Project-URL: Issues, https://github.com/codevfllc/langchain-human-in-the-loop/issues
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Python: >=3.8
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Dynamic: license-file
24
+
25
+ # langchain-human-in-the-loop
26
+
27
+ `langchain-human-in-the-loop` is a small Python package scaffold for human-in-the-loop fallback patterns in LangChain-style applications.
28
+
29
+ ## Install (local)
30
+
31
+ ```bash
32
+ python3 -m pip install -e .
33
+ ```
34
+
35
+ ## Build package artifacts
36
+
37
+ ```bash
38
+ python3 -m pip install --upgrade build
39
+ python3 -m build
40
+ ```
41
+
42
+ This creates:
43
+ - `dist/langchain_human_in_the_loop-<version>.tar.gz`
44
+ - `dist/langchain_human_in_the_loop-<version>-py3-none-any.whl`
45
+
46
+ ## Publish to PyPI
47
+
48
+ ```bash
49
+ python3 -m pip install --upgrade twine
50
+ python3 -m twine upload dist/*
51
+ ```
52
+
53
+ Tip: publish once ASAP with this name to claim it, then iterate on functionality in later releases.
@@ -0,0 +1,9 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/langchain_human_in_the_loop/__init__.py
5
+ src/langchain_human_in_the_loop/fallback.py
6
+ src/langchain_human_in_the_loop.egg-info/PKG-INFO
7
+ src/langchain_human_in_the_loop.egg-info/SOURCES.txt
8
+ src/langchain_human_in_the_loop.egg-info/dependency_links.txt
9
+ src/langchain_human_in_the_loop.egg-info/top_level.txt