Skip to content

Commit 0f31552

Browse files
committed
Python: Update README.md for 6.0
1 parent fed98de commit 0f31552

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

python/README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ The scan functions will return the following dict:
4848
pip3 install gdata-vaas
4949
```
5050

51+
gdata-vaas requires Python 3.12+.
52+
5153
### Import
5254

5355
```python
@@ -64,30 +66,27 @@ authenticator = ClientCredentialsGrantAuthenticator(
6466
TOKEN_URL,
6567
SSL_VERIFICATION
6668
)
69+
vaas = Vaas(authenticator=authenticator)
6770
```
6871

72+
The Vaas instance can and should be used for multiple requests.
73+
6974
Verdict Request for SHA256:
7075
```python
71-
async with Vaas() as vaas:
72-
await vaas.connect(await authenticator.get_token())
73-
sha256 = "275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f"
74-
verdict = await vaas.for_sha256(sha256)
76+
sha256 = "275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f"
77+
verdict = await vaas.for_sha256(sha256)
7578
```
7679

7780
Verdict Request for a file:
7881
```python
79-
async with Vaas() as vaas:
80-
await vaas.connect(await authenticator.get_token())
81-
path = "/path/to/file"
82-
verdict = await vaas.for_file(path)
82+
path = "/path/to/file"
83+
verdict = await vaas.for_file(path)
8384
```
8485

8586
Verdict Request for a URL:
8687
```python
87-
async with Vaas() as vaas:
88-
await vaas.connect(await authenticator.get_token())
89-
url = "https://www.gdatasoftware.com/oem/verdict-as-a-service"
90-
verdict = await vaas.for_url(url)
88+
url = "https://www.gdatasoftware.com/oem/verdict-as-a-service"
89+
verdict = await vaas.for_url(url)
9190
```
9291

9392
## <a name="interested"></a>I'm interested in VaaS
@@ -96,4 +95,4 @@ You need credentials to use the service in your application. If you are interest
9695

9796
## Developing with Visual Studio Code
9897

99-
Every single SDKs also includes [Devcontainer](./devcontainer/). If you use the [Visual Studio Code Dev Containers extension](https://code.visualstudio.com/docs/devcontainers/containers), you can run the code in a full-featured development environment.
98+
Every single SDKs also includes [Devcontainer](./devcontainer/). If you use the [Visual Studio Code Dev Containers extension](https://code.visualstudio.com/docs/devcontainers/containers), you can run the code in a full-featured development environment.

0 commit comments

Comments
 (0)