Skip to content

Commit c5f235d

Browse files
committed
Address the comments
1 parent db5548d commit c5f235d

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

examples/sample_get_identity_buckets.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
from uid2_client import IdentityMapClient
55

66

7-
# this sample client takes date time as input and generates an IdentityBucketsResponse object which contains
8-
# a list of buckets, the timestamp strings in the format YYYY-MM-DD[*HH[:MM[:SS[.fff[fff]]]][+HH:MM[:SS[.ffffff]]]],
7+
# this sample client takes timestamp string as input and generates an IdentityBucketsResponse object which contains
8+
# a list of buckets, the timestamp string in the format YYYY-MM-DD[*HH[:MM[:SS[.fff[fff]]]][+HH:MM[:SS[.ffffff]]]],
99
# for example: UTC: 2024-07-02, 2024-07-02T14:30:15.123456+00:00 and EST: 2024-07-02T14:30:15.123456-05:00
1010

1111
def _usage():
@@ -26,6 +26,9 @@ def _usage():
2626

2727
identity_buckets_response = client.get_identity_buckets(datetime.fromisoformat(timestamp))
2828

29-
for bucket in identity_buckets_response.buckets:
30-
print("The bucket id of the bucket: ", bucket.get_bucket_id())
31-
print("The last updated timestamp of the bucket: ", bucket.get_last_updated())
29+
if identity_buckets_response.buckets:
30+
for bucket in identity_buckets_response.buckets:
31+
print("The bucket id of the bucket: ", bucket.get_bucket_id())
32+
print("The last updated timestamp of the bucket: ", bucket.get_last_updated())
33+
else:
34+
print("No bucket was returned")

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ requires-python = ">=3.6"
2222
dependencies = [
2323
"setuptools",
2424
"pycryptodome",
25-
"bitarray"
25+
"bitarray",
26+
"pytz"
2627
]
2728
keywords = ["uid2"]
2829
[project.license]

0 commit comments

Comments
 (0)