Skip to content

Commit 777a008

Browse files
Sid MohanSid Mohan
authored andcommitted
v2.4.0
1 parent 565c692 commit 777a008

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,16 @@ and in your python environment:
7373

7474
```
7575
from datafog import PresidioEngine as presidio
76+
datafog = datafog.DataFog()
77+
7678
```
7779

7880
## Examples
7981

8082
Here are some examples of datafog being used to redact information in business contexts. Please see '/examples' for our [Getting Started](examples/getting-started.ipynb) notebook. We'll be regularly updating content and providing comprehensive guides to using DataFog in production contexts. If you have any ideas for a tutorial or guide that you would like to see, please let us know!
8183

84+
### Scanning a single string
85+
8286
```
8387
ceo_email_chunk = "I'm announcing on Friday that Jeff is going to be CTO."
8488
@@ -93,6 +97,20 @@ Here are some examples of datafog being used to redact information in business c
9397
9498
```
9599

100+
### Scanning a list of PDFs
101+
102+
```
103+
file_dir = ["/Users/sidmohan/Desktop/datafog-v2.4.0/datafog-python/tests/files/input_files/agi-builder-meetup.pdf",
104+
"/Users/sidmohan/Desktop/datafog-v2.4.0/datafog-python/tests/files/input_files/pypdf-readthedocs-io-en-stable.pdf"]
105+
datafog = datafog.DataFog()
106+
result = datafog.upload_files(uploaded_files=file_dir)
107+
print(result)
108+
```
109+
110+
The output here will be a dictionary where the keys are the file names and the values are the scan results for that file.
111+
for ex:
112+
`{'agi-builder-meetup.pdf': "2/26/24, 2:16 PM\nAGI Builders Meetup SF · Luma\nContact the HostReport Event29\nEvent FullIf youʼd like"}`
113+
96114
## Contributing
97115

98116
DataFog is a community-driven **open-source** platform and we've been fortunate to have a small and growing contributor base. We'd love to hear ideas, feedback, suggestions for improvement - anything on your mind about what you think can be done to make DataFog better! Join our [Discord](https://discord.gg/bzDth394R4) and join our growing community.

examples/uploading-file-types.ipynb

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"outputs": [],
3232
"source": [
3333
"# Initialize\n",
34-
"%pip install datafog==2.4.0b3\n",
34+
"%pip install datafog==2.4.0b4\n",
3535
"import json\n",
3636
"\n",
3737
"import requests\n",
@@ -138,15 +138,25 @@
138138
"cell_type": "markdown",
139139
"metadata": {},
140140
"source": [
141-
"### PPTX \n"
141+
"### Multiple PDFs\n",
142+
"\n",
143+
"\n"
142144
]
143145
},
144146
{
145147
"cell_type": "code",
146148
"execution_count": null,
147149
"metadata": {},
148150
"outputs": [],
149-
"source": []
151+
"source": [
152+
"file_dir = [\n",
153+
" \"/Users/sidmohan/Desktop/datafog-v2.4.0/datafog-python/tests/files/input_files/agi-builder-meetup.pdf\",\n",
154+
" \"/Users/sidmohan/Desktop/datafog-v2.4.0/datafog-python/tests/files/input_files/pypdf-readthedocs-io-en-stable.pdf\",\n",
155+
"]\n",
156+
"datafog = datafog.DataFog()\n",
157+
"result = datafog.upload_files(uploaded_files=file_dir)\n",
158+
"print(result)"
159+
]
150160
}
151161
],
152162
"metadata": {

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
def __version__():
9-
return "2.4.0b4"
9+
return "2.4.0"
1010

1111

1212
project_urls = {

0 commit comments

Comments
 (0)