datafog 2.3.2__tar.gz → 2.3.2b2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datafog
3
- Version: 2.3.2
3
+ Version: 2.3.2b2
4
4
  Summary: Scan, redact, and manage PII in your documents before they get uploaded to a Retrieval Augmented Generation (RAG) system.
5
5
  Home-page: https://datafog.ai
6
6
  Author: DataFog
@@ -5,10 +5,6 @@ with open("README.md", "r") as f:
5
5
  long_description = f.read()
6
6
 
7
7
 
8
- def __version__():
9
- return "2.3.2"
10
-
11
-
12
8
  project_urls = {
13
9
  "Homepage": "https://datafog.ai",
14
10
  "Documentation": "https://docs.datafog.ai",
@@ -20,7 +16,7 @@ project_urls = {
20
16
 
21
17
  setup(
22
18
  name="datafog",
23
- version=__version__(),
19
+ version="2.3.2b2",
24
20
  author="DataFog",
25
21
  author_email="hi@datafog.ai",
26
22
  description="Scan, redact, and manage PII in your documents before they get uploaded to a Retrieval Augmented Generation (RAG) system.",
@@ -1,2 +1,2 @@
1
1
  # SSOT for the package version
2
- __version__ = "2.3.2"
2
+ __version__ = "2.3.2b2"
@@ -1,3 +1,4 @@
1
+ import json
1
2
  import logging
2
3
  from typing import List, Optional
3
4
 
@@ -161,6 +162,26 @@ def scan(text, **kwargs):
161
162
  Returns:
162
163
  List[AnalysisResult]: The list of analysis results.
163
164
  """
165
+ # handling for input 'text'
166
+ if isinstance(text, str):
167
+
168
+ if text.endswith(".json"):
169
+ print("Reading JSON from local path")
170
+ with open(text, "r") as file:
171
+ data = json.load(file)
172
+ text = json.dumps(data)
173
+ else:
174
+ text = text
175
+ else:
176
+ raise ValueError("Unsupported input source type: {}".format(type(text)))
177
+
178
+ # set default values for keyword arguments
179
+
180
+
181
+
182
+
183
+
184
+
164
185
  kwargs.setdefault("language", "en")
165
186
  kwargs.setdefault("score_threshold", 0.35)
166
187
  kwargs.setdefault("nlp_artifacts", None)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datafog
3
- Version: 2.3.2
3
+ Version: 2.3.2b2
4
4
  Summary: Scan, redact, and manage PII in your documents before they get uploaded to a Retrieval Augmented Generation (RAG) system.
5
5
  Home-page: https://datafog.ai
6
6
  Author: DataFog
File without changes
File without changes
File without changes
File without changes