You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
res = novu.trigger(trigger_event_request_dto=novu_py.TriggerEventRequestDto(
@@ -695,10 +687,10 @@ When custom error responses are specified for an operation, the SDK may also rai
695
687
```python
696
688
import novu_py
697
689
from novu_py import Novu, models
698
-
import os
690
+
699
691
700
692
with Novu(
701
-
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
693
+
secret_key="YOUR_SECRET_KEY_HERE",
702
694
) as novu:
703
695
res =None
704
696
try:
@@ -751,21 +743,21 @@ with Novu(
751
743
752
744
You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
753
745
754
-
| # | Server |
755
-
| --- | ------------------------ |
756
-
| 0 |`https://api.novu.co`|
757
-
| 1 |`https://eu.api.novu.co`|
746
+
| # | Server | Description |
747
+
| --- | ------------------------ | ----------- |
748
+
| 0 |`https://api.novu.co`||
749
+
| 1 |`https://eu.api.novu.co`||
758
750
759
751
#### Example
760
752
761
753
```python
762
754
import novu_py
763
755
from novu_py import Novu
764
-
import os
756
+
765
757
766
758
with Novu(
767
759
server_idx=1,
768
-
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
760
+
secret_key="YOUR_SECRET_KEY_HERE",
769
761
) as novu:
770
762
771
763
res = novu.trigger(trigger_event_request_dto=novu_py.TriggerEventRequestDto(
@@ -799,11 +791,11 @@ The default server can also be overridden globally by passing a URL to the `serv
799
791
```python
800
792
import novu_py
801
793
from novu_py import Novu
802
-
import os
794
+
803
795
804
796
with Novu(
805
797
server_url="https://api.novu.co",
806
-
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
798
+
secret_key="YOUR_SECRET_KEY_HERE",
807
799
) as novu:
808
800
809
801
res = novu.trigger(trigger_event_request_dto=novu_py.TriggerEventRequestDto(
@@ -928,10 +920,10 @@ To authenticate with the API the `secret_key` parameter must be set when initial
928
920
```python
929
921
import novu_py
930
922
from novu_py import Novu
931
-
import os
923
+
932
924
933
925
with Novu(
934
-
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
926
+
secret_key="YOUR_SECRET_KEY_HERE",
935
927
) as novu:
936
928
937
929
res = novu.trigger(trigger_event_request_dto=novu_py.TriggerEventRequestDto(
@@ -969,18 +961,19 @@ The `Novu` class implements the context manager protocol and registers a finaliz
0 commit comments