Skip to content

Commit 164490d

Browse files
author
João Guerreiro
committed
fix(doc): simplify example
1 parent 9df59e9 commit 164490d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,10 @@ poetry add pygitguardian
3737

3838
Check [examples/](examples/) for an example usages of the API.
3939

40-
### Scanning a piece of text
40+
### Scanning text content
4141

4242
```py
4343
API_KEY = os.getenv("GG_API_KEY")
44-
FILENAME = ".env"
4544
DOCUMENT = """
4645
import urllib.request
4746
url = 'http://jen_barber:[email protected]/isreal.json'
@@ -58,7 +57,7 @@ if status != codes[r"\o/"]: # this is 200 but cooler
5857
print("Invalid API Key")
5958

6059
try:
61-
scan_result = client.content_scan(filename=FILENAME, document=DOCUMENT)
60+
scan_result = client.content_scan(DOCUMENT)
6261
except Exception as exc:
6362
# Handle exceptions such as schema validation
6463
traceback.print_exc(2, file=sys.stderr)

0 commit comments

Comments
 (0)