evalidate 2.1.0__tar.gz → 2.1.2__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.
- {evalidate-2.1.0 → evalidate-2.1.2}/PKG-INFO +5 -2
- {evalidate-2.1.0 → evalidate-2.1.2}/README.md +2 -0
- {evalidate-2.1.0 → evalidate-2.1.2}/evalidate/__init__.py +1 -1
- {evalidate-2.1.0 → evalidate-2.1.2}/evalidate/cli/genfakeproducts.py +6 -1
- {evalidate-2.1.0 → evalidate-2.1.2}/evalidate/cli/jg.py +0 -1
- {evalidate-2.1.0 → evalidate-2.1.2}/pyproject.toml +5 -1
- {evalidate-2.1.0 → evalidate-2.1.2}/.gitignore +0 -0
- {evalidate-2.1.0 → evalidate-2.1.2}/LICENSE +0 -0
- {evalidate-2.1.0 → evalidate-2.1.2}/benchmark/benchmark.py +0 -0
- {evalidate-2.1.0 → evalidate-2.1.2}/evalidate/credits.txt +0 -0
- {evalidate-2.1.0 → evalidate-2.1.2}/evalidate/security.py +0 -0
- {evalidate-2.1.0 → evalidate-2.1.2}/examples/basic.py +0 -0
- {evalidate-2.1.0 → evalidate-2.1.2}/setup.py +0 -0
- {evalidate-2.1.0 → evalidate-2.1.2}/tests/__init__.py +0 -0
- {evalidate-2.1.0 → evalidate-2.1.2}/tests/test_exc.py +0 -0
- {evalidate-2.1.0 → evalidate-2.1.2}/tests/test_expr.py +0 -0
- {evalidate-2.1.0 → evalidate-2.1.2}/tests/test_feature.py +0 -0
- {evalidate-2.1.0 → evalidate-2.1.2}/tests/test_jailbreak.py +0 -0
- {evalidate-2.1.0 → evalidate-2.1.2}/tests/test_locals_globals.py +0 -0
- {evalidate-2.1.0 → evalidate-2.1.2}/tests/test_no_mutation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: evalidate
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.2
|
|
4
4
|
Summary: Validation and secure evaluation of untrusted python expressions
|
|
5
5
|
Project-URL: Homepage, https://github.com/yaroslaff/evalidate
|
|
6
6
|
Project-URL: Issues, https://github.com/yaroslaff/evalidate/issues
|
|
@@ -11,7 +11,8 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
11
11
|
Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
13
|
Requires-Python: >=3.8
|
|
14
|
-
|
|
14
|
+
Provides-Extra: generate
|
|
15
|
+
Requires-Dist: faker; extra == 'generate'
|
|
15
16
|
Description-Content-Type: text/markdown
|
|
16
17
|
|
|
17
18
|
# Evalidate
|
|
@@ -163,6 +164,8 @@ Example record:
|
|
|
163
164
|
}
|
|
164
165
|
```
|
|
165
166
|
|
|
167
|
+
To use genfakeproducts, you need to install evalidate with "generate" extra: `pip3 install evalidate[generate]`
|
|
168
|
+
|
|
166
169
|
### jg (grep)
|
|
167
170
|
`jg` is a very fast JSON grep CLI tool. It accepts a Python expression and a filename, or reads from stdin:
|
|
168
171
|
|
|
@@ -147,6 +147,8 @@ Example record:
|
|
|
147
147
|
}
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
+
To use genfakeproducts, you need to install evalidate with "generate" extra: `pip3 install evalidate[generate]`
|
|
151
|
+
|
|
150
152
|
### jg (grep)
|
|
151
153
|
`jg` is a very fast JSON grep CLI tool. It accepts a Python expression and a filename, or reads from stdin:
|
|
152
154
|
|
|
@@ -11,10 +11,15 @@ Example:
|
|
|
11
11
|
|
|
12
12
|
import argparse, json, random, uuid
|
|
13
13
|
from datetime import datetime, UTC
|
|
14
|
-
|
|
14
|
+
try:
|
|
15
|
+
from faker import Faker
|
|
16
|
+
except ImportError:
|
|
17
|
+
print("Faker library is required. You can reinstall evalidate with the 'generate' extra: pipx install 'evalidate[generate]'")
|
|
18
|
+
exit(1)
|
|
15
19
|
|
|
16
20
|
fake = Faker()
|
|
17
21
|
|
|
22
|
+
|
|
18
23
|
BRANDS = {
|
|
19
24
|
"phones": ["Samsung", "Apple", "Xiaomi", "OnePlus", "Google"],
|
|
20
25
|
"laptops": ["Dell", "HP", "Lenovo", "Asus", "Acer", "Apple"],
|
|
@@ -10,7 +10,7 @@ name="evalidate"
|
|
|
10
10
|
dynamic = [ "version" ]
|
|
11
11
|
keywords = ["python", "security", "json", "sandbox", "filter", "evaluation", "expression", "secure", "jq", "jg", "validate", "safe", "grep", "eval", "evaluate", "jg"]
|
|
12
12
|
|
|
13
|
-
dependencies = [
|
|
13
|
+
dependencies = []
|
|
14
14
|
authors = [
|
|
15
15
|
{ name="Yaroslav Polyakov", email="yaroslaff@gmail.com" },
|
|
16
16
|
]
|
|
@@ -23,6 +23,10 @@ classifiers = [
|
|
|
23
23
|
"Operating System :: OS Independent",
|
|
24
24
|
]
|
|
25
25
|
|
|
26
|
+
[project.optional-dependencies]
|
|
27
|
+
generate = ["faker"]
|
|
28
|
+
|
|
29
|
+
|
|
26
30
|
[project.urls]
|
|
27
31
|
Homepage = "https://github.com/yaroslaff/evalidate"
|
|
28
32
|
Issues = "https://github.com/yaroslaff/evalidate/issues"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|