ostruct-cli 0.2.0__py3-none-any.whl → 0.3.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.
- ostruct/cli/__init__.py +2 -2
- ostruct/cli/cli.py +476 -580
- ostruct/cli/click_options.py +248 -0
- ostruct/cli/errors.py +297 -139
- ostruct/cli/file_info.py +76 -13
- ostruct/cli/file_utils.py +2 -1
- ostruct/cli/security.py +790 -149
- ostruct/cli/security_types.py +3 -6
- ostruct/cli/template_io.py +4 -2
- {ostruct_cli-0.2.0.dist-info → ostruct_cli-0.3.0.dist-info}/METADATA +4 -2
- {ostruct_cli-0.2.0.dist-info → ostruct_cli-0.3.0.dist-info}/RECORD +14 -13
- {ostruct_cli-0.2.0.dist-info → ostruct_cli-0.3.0.dist-info}/LICENSE +0 -0
- {ostruct_cli-0.2.0.dist-info → ostruct_cli-0.3.0.dist-info}/WHEEL +0 -0
- {ostruct_cli-0.2.0.dist-info → ostruct_cli-0.3.0.dist-info}/entry_points.txt +0 -0
ostruct/cli/security_types.py
CHANGED
@@ -5,7 +5,7 @@ from typing import List, Protocol
|
|
5
5
|
|
6
6
|
|
7
7
|
class SecurityManagerProtocol(Protocol):
|
8
|
-
"""Protocol defining the interface for security
|
8
|
+
"""Protocol defining the interface for security management."""
|
9
9
|
|
10
10
|
@property
|
11
11
|
def base_dir(self) -> Path:
|
@@ -17,7 +17,7 @@ class SecurityManagerProtocol(Protocol):
|
|
17
17
|
"""Get the list of allowed directories."""
|
18
18
|
...
|
19
19
|
|
20
|
-
def
|
20
|
+
def add_allowed_directory(self, directory: str) -> None:
|
21
21
|
"""Add a directory to the set of allowed directories."""
|
22
22
|
...
|
23
23
|
|
@@ -42,8 +42,5 @@ class SecurityManagerProtocol(Protocol):
|
|
42
42
|
...
|
43
43
|
|
44
44
|
def resolve_path(self, path: str) -> Path:
|
45
|
-
"""Resolve and validate a path.
|
46
|
-
|
47
|
-
This is an alias for validate_path() for backward compatibility.
|
48
|
-
"""
|
45
|
+
"""Resolve and validate a path."""
|
49
46
|
...
|
ostruct/cli/template_io.py
CHANGED
@@ -97,8 +97,10 @@ def read_file(
|
|
97
97
|
if security_manager is None:
|
98
98
|
from .security import SecurityManager
|
99
99
|
|
100
|
-
security_manager = SecurityManager()
|
101
|
-
logger.debug(
|
100
|
+
security_manager = SecurityManager(base_dir=os.getcwd())
|
101
|
+
logger.debug(
|
102
|
+
"Created default SecurityManager with base_dir=%s", os.getcwd()
|
103
|
+
)
|
102
104
|
|
103
105
|
# Create progress context
|
104
106
|
with ProgressContext(
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: ostruct-cli
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.3.0
|
4
4
|
Summary: CLI for OpenAI Structured Output
|
5
5
|
Author: Yaniv Golan
|
6
6
|
Author-email: yaniv@golan.name
|
@@ -13,14 +13,16 @@ Classifier: Programming Language :: Python :: 3.12
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.13
|
14
14
|
Requires-Dist: cachetools (>=5.3.2,<6.0.0)
|
15
15
|
Requires-Dist: chardet (>=5.0.0,<6.0.0)
|
16
|
+
Requires-Dist: click (>=8.1.7,<9.0.0)
|
16
17
|
Requires-Dist: ijson (>=3.2.3,<4.0.0)
|
17
18
|
Requires-Dist: jsonschema (>=4.23.0,<5.0.0)
|
18
19
|
Requires-Dist: openai-structured (>=1.0.0,<2.0.0)
|
19
20
|
Requires-Dist: pydantic (>=2.6.3,<3.0.0)
|
20
21
|
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
|
21
|
-
Requires-Dist: tiktoken (>=0.
|
22
|
+
Requires-Dist: tiktoken (>=0.8.0,<0.9.0)
|
22
23
|
Requires-Dist: tomli (>=2.0.1,<3.0.0) ; python_version < "3.11"
|
23
24
|
Requires-Dist: typing-extensions (>=4.9.0,<5.0.0)
|
25
|
+
Requires-Dist: werkzeug (>=3.1.3,<4.0.0)
|
24
26
|
Description-Content-Type: text/markdown
|
25
27
|
|
26
28
|
# ostruct-cli
|
@@ -1,27 +1,28 @@
|
|
1
1
|
ostruct/__init__.py,sha256=X6zo6V7ZNMv731Wi388aTVQngD1410ExGwGx4J6lpyo,187
|
2
|
-
ostruct/cli/__init__.py,sha256=
|
2
|
+
ostruct/cli/__init__.py,sha256=sYHKT6o1kFy1acbXejzAvVm8Cy8U91Yf1l4DlzquHKg,409
|
3
3
|
ostruct/cli/cache_manager.py,sha256=ej3KrRfkKKZ_lEp2JswjbJ5bW2ncsvna9NeJu81cqqs,5192
|
4
|
-
ostruct/cli/cli.py,sha256=
|
5
|
-
ostruct/cli/
|
6
|
-
ostruct/cli/
|
4
|
+
ostruct/cli/cli.py,sha256=SNUz6PYD0KOxXmE5C1GBpmmeE6vVGGN8nss4FoxOO1w,66887
|
5
|
+
ostruct/cli/click_options.py,sha256=HfCmVWp2DjcUdM0epPtyKW3mQHQBCn0BICfTlfaUvSM,7303
|
6
|
+
ostruct/cli/errors.py,sha256=a482qbF4T1Pm7XzhnN_0vgvOLCOzdLPEscyRBacBYTM,14465
|
7
|
+
ostruct/cli/file_info.py,sha256=lNDri3Z3RJK2-IbfjcJejQsdpW1X8r6KzioMHFY6O8Q,12450
|
7
8
|
ostruct/cli/file_list.py,sha256=srrouvhimoklNo69nWjrKyUN-5zTOmtVj_swdBZPBTk,7105
|
8
|
-
ostruct/cli/file_utils.py,sha256=
|
9
|
+
ostruct/cli/file_utils.py,sha256=XupWGwIfcQEJiDUNS0uaIuDLh_wSYfb4iFy_-5ql8UY,21190
|
9
10
|
ostruct/cli/path_utils.py,sha256=jhJsvmxsq0_FU5cWwB-JoEymGbvB2JX9Q0a-dUf0s1w,4461
|
10
11
|
ostruct/cli/progress.py,sha256=rj9nVEco5UeZORMbzd7mFJpFGJjbH9KbBFh5oTE5Anw,3415
|
11
|
-
ostruct/cli/security.py,sha256=
|
12
|
-
ostruct/cli/security_types.py,sha256=
|
12
|
+
ostruct/cli/security.py,sha256=_XKKYDht0EbY-MFm4Upf4QJRR9noqmHUHoBuRuMv6sw,34849
|
13
|
+
ostruct/cli/security_types.py,sha256=f2udKyzLpHCrf7nMabNmqyZr9k1DC-KJFF4vU4LmDqE,1266
|
13
14
|
ostruct/cli/template_env.py,sha256=S2ZvxuMQMicodSVqUhrw0kOzbNmlpQjSHtWlOwjXCms,1538
|
14
15
|
ostruct/cli/template_extensions.py,sha256=tJN3HGAS2yzGI8Up6STPday8NVL0VV6UCClBrtDKYr0,1623
|
15
16
|
ostruct/cli/template_filters.py,sha256=SNp7PR4ZbuC9BVUlEgwzd6VZYjI0lsobTabLiJe_sZM,19030
|
16
|
-
ostruct/cli/template_io.py,sha256=
|
17
|
+
ostruct/cli/template_io.py,sha256=yUWO-8rZnSdX97DTMSEX8fG9CP1ISsOhm2NZN3Fab9A,8821
|
17
18
|
ostruct/cli/template_rendering.py,sha256=GrQAcKpGe6QEjSVQkOjpegMcor9LzVUikGmmEVgiWCE,12391
|
18
19
|
ostruct/cli/template_schema.py,sha256=ckH4rUZnEgfm_BHS9LnMGr8LtDxRmZ0C6UBVrSp8KTc,19604
|
19
20
|
ostruct/cli/template_utils.py,sha256=QGgewxU_Tgn81J5U-Y4xfi67CkN2dEqXI7PsaNiI9es,7812
|
20
21
|
ostruct/cli/template_validation.py,sha256=q3ACw4TscdekJb3Z3CTYw0YPEYttqjKjm74ap4lWtU4,11737
|
21
22
|
ostruct/cli/utils.py,sha256=1UCl4rHjBWKR5EKugvlVGHiHjO3XXmqvkgeAUSyIPDU,831
|
22
23
|
ostruct/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
23
|
-
ostruct_cli-0.
|
24
|
-
ostruct_cli-0.
|
25
|
-
ostruct_cli-0.
|
26
|
-
ostruct_cli-0.
|
27
|
-
ostruct_cli-0.
|
24
|
+
ostruct_cli-0.3.0.dist-info/LICENSE,sha256=QUOY6QCYVxAiH8vdrUTDqe3i9hQ5bcNczppDSVpLTjk,1068
|
25
|
+
ostruct_cli-0.3.0.dist-info/METADATA,sha256=ksJC7l-LyFQURgjL_gWvcEaL47LDlVoVxbqEe1o5TzU,5379
|
26
|
+
ostruct_cli-0.3.0.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
27
|
+
ostruct_cli-0.3.0.dist-info/entry_points.txt,sha256=NFq9IuqHVTem0j9zKjV8C1si_zGcP1RL6Wbvt9fUDXw,48
|
28
|
+
ostruct_cli-0.3.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|