Skip to content

Commit 41e3cd0

Browse files
committed
small fix to example
1 parent c6c7305 commit 41e3cd0

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

examples/containers/fileset_secret_example.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from datacrunch import DataCrunchClient
33

44
# Fileset secrets are a way to mount sensitive files like API keys, certs, and credentials securely inside a container, without hardcoding them in the image or env vars.
5-
5+
# This example demonstrates how to create a fileset secret containing two files from your local filesystem
66

77
# Get client secret and id from environment variables
88
DATACRUNCH_CLIENT_ID = os.environ.get('DATACRUNCH_CLIENT_ID')
@@ -11,8 +11,8 @@
1111
# Initialize the client with your credentials
1212
datacrunch = DataCrunchClient(DATACRUNCH_CLIENT_ID, DATACRUNCH_CLIENT_SECRET)
1313

14-
# Define the secret name and the file paths
15-
SECRET_NAME = "my_fileset_secret"
14+
# Define the secret name and the file paths from your local filesystem where this script is running
15+
SECRET_NAME = "my-fileset-secret"
1616
RELATIVE_FILE_PATH = "./relative-path/file1.txt"
1717
ABSOLUTE_FILE_PATH = "/home/username/absolute-path/file2.json"
1818

@@ -21,9 +21,8 @@
2121
secret_name=SECRET_NAME, file_paths=[RELATIVE_FILE_PATH, ABSOLUTE_FILE_PATH])
2222

2323
# Get the secret
24-
secret = datacrunch.containers.get_fileset_secret(
25-
secret_name=SECRET_NAME)
26-
print(secret)
24+
secrets = datacrunch.containers.get_fileset_secrets()
25+
print(secrets)
2726

2827
# Delete the secret
2928
datacrunch.containers.delete_fileset_secret(secret_name=SECRET_NAME)

0 commit comments

Comments
 (0)