-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a27ac8b
commit 9f833c3
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import os | ||
|
||
from dotenv import load_dotenv | ||
from sift_py.grpc.transport import SiftChannelConfig, use_sift_channel | ||
from sift.ping.v1.ping_pb2 import PingRequest | ||
from sift.ping.v1.ping_pb2_grpc import PingServiceStub | ||
|
||
|
||
if __name__ == "__main__": | ||
load_dotenv() | ||
|
||
apikey = os.getenv("SIFT_API_KEY") | ||
assert apikey | ||
|
||
uri = os.getenv("BASE_URI") | ||
assert uri | ||
|
||
channel_config: SiftChannelConfig = { | ||
"apikey": apikey, | ||
"uri": uri, | ||
} | ||
|
||
with use_sift_channel(channel_config) as channel: | ||
response = PingServiceStub(channel).Ping(PingRequest()) | ||
print(response) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
python-dotenv | ||
sift-stack-py==0.3.0rc3 |