Skip to content

Commit

Permalink
chore: 🐝 Update SDK - Generate 0.4.0 (#10)
Browse files Browse the repository at this point in the history
* ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.508.1

* empty commit to trigger [run-tests] workflow

---------

Co-authored-by: speakeasybot <[email protected]>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 3, 2025
1 parent aeef9ae commit 7568c56
Show file tree
Hide file tree
Showing 121 changed files with 878 additions and 4,354 deletions.
99 changes: 31 additions & 68 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ generation:
useClassNamesForArrayFields: true
fixes:
nameResolutionDec2023: true
nameResolutionFeb2025: false
parameterOrderingFeb2024: true
requestResponseComponentNamesFeb2024: true
securityFeb2025: false
auth:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: true
python:
version: 0.3.4
version: 0.4.0
additionalDependencies:
dev:
- pytest>=6.0.0
Expand Down Expand Up @@ -50,5 +52,6 @@ python:
methodArguments: infer-optional-args
outputModelSuffix: output
packageName: novu-py
pytestTimeout: 0
responseFormat: flat
templateVersion: v2
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
speakeasyVersion: 1.484.1
speakeasyVersion: 1.508.1
sources:
novu-OAS:
sourceNamespace: novu-oas
sourceRevisionDigest: sha256:3c883b168e1783744a16c908e3a69b3f36443e150da8cde51013031094766498
sourceBlobDigest: sha256:db81ca9cc9bf732f310e4177d6b79f2389839029e46460e72e2f808d5452e26a
sourceRevisionDigest: sha256:8945b12a38f6118cc30d593aadb9d5b5eb24eeb0f19509f042f982aea9083f47
sourceBlobDigest: sha256:6d9beef404948b5fb4b86e91d215329c72d65182e8b0feae013525be77e4b774
tags:
- latest
- speakeasy-sdk-regen-1738742359
- speakeasy-sdk-regen-1741008646
- "1.0"
targets:
novu:
source: novu-OAS
sourceNamespace: novu-oas
sourceRevisionDigest: sha256:3c883b168e1783744a16c908e3a69b3f36443e150da8cde51013031094766498
sourceBlobDigest: sha256:db81ca9cc9bf732f310e4177d6b79f2389839029e46460e72e2f808d5452e26a
sourceRevisionDigest: sha256:8945b12a38f6118cc30d593aadb9d5b5eb24eeb0f19509f042f982aea9083f47
sourceBlobDigest: sha256:6d9beef404948b5fb4b86e91d215329c72d65182e8b0feae013525be77e4b774
codeSamplesNamespace: novu-oas-python-code-samples
codeSamplesRevisionDigest: sha256:00a74842af61666058a7cb0315fddfd5b66e1b4869f39e8cd6869ec08ace8117
codeSamplesRevisionDigest: sha256:f1b67ebc1dc4d8fe4893c1f8dcd011f398e43d8c043a917036ceacf8ea283f79
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
85 changes: 39 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ For more information about the API: [Novu Documentation](https://docs.novu.co)
* [Resource Management](#resource-management)
* [Debugging](#debugging)
* [Development](#development)
* [Maturity](#maturity)
* [Contributions](#contributions)

<!-- End Table of Contents [toc] -->
Expand Down Expand Up @@ -118,10 +117,10 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
# Synchronous Example
import novu_py
from novu_py import Novu
import os


with Novu(
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:

res = novu.trigger(trigger_event_request_dto=novu_py.TriggerEventRequestDto(
Expand Down Expand Up @@ -156,11 +155,11 @@ The same SDK client can also be used to make asychronous requests by importing a
import asyncio
import novu_py
from novu_py import Novu
import os

async def main():

async with Novu(
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:

res = await novu.trigger_async(trigger_event_request_dto=novu_py.TriggerEventRequestDto(
Expand Down Expand Up @@ -195,10 +194,10 @@ asyncio.run(main())
# Synchronous Example
import novu_py
from novu_py import Novu
import os


with Novu(
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:

res = novu.trigger_bulk(bulk_trigger_event_dto={
Expand Down Expand Up @@ -279,11 +278,11 @@ The same SDK client can also be used to make asychronous requests by importing a
import asyncio
import novu_py
from novu_py import Novu
import os

async def main():

async with Novu(
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:

res = await novu.trigger_bulk_async(bulk_trigger_event_dto={
Expand Down Expand Up @@ -363,10 +362,10 @@ asyncio.run(main())
```python
# Synchronous Example
from novu_py import Novu
import os


with Novu(
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:

res = novu.trigger_broadcast(trigger_event_to_all_request_dto={
Expand All @@ -390,11 +389,11 @@ The same SDK client can also be used to make asychronous requests by importing a
# Asynchronous Example
import asyncio
from novu_py import Novu
import os

async def main():

async with Novu(
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:

res = await novu.trigger_broadcast_async(trigger_event_to_all_request_dto={
Expand All @@ -418,10 +417,10 @@ asyncio.run(main())
```python
# Synchronous Example
from novu_py import Novu
import os


with Novu(
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:

res = novu.cancel(transaction_id="<id>")
Expand All @@ -437,11 +436,11 @@ The same SDK client can also be used to make asychronous requests by importing a
# Asynchronous Example
import asyncio
from novu_py import Novu
import os

async def main():

async with Novu(
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:

res = await novu.cancel_async(transaction_id="<id>")
Expand Down Expand Up @@ -498,12 +497,9 @@ asyncio.run(main())
### [subscribers](docs/sdks/subscribers/README.md)

* [list](docs/sdks/subscribers/README.md#list) - Get subscribers
* [create](docs/sdks/subscribers/README.md#create) - Create subscriber
* [retrieve_legacy](docs/sdks/subscribers/README.md#retrieve_legacy) - Get subscriber
* [update](docs/sdks/subscribers/README.md#update) - Update subscriber
* [~~delete_legacy~~](docs/sdks/subscribers/README.md#delete_legacy) - Delete subscriber :warning: **Deprecated**
* [create_bulk](docs/sdks/subscribers/README.md#create_bulk) - Bulk create subscribers
* [search](docs/sdks/subscribers/README.md#search) - Search for subscribers
* [create](docs/sdks/subscribers/README.md#create) - Create subscriber
* [retrieve](docs/sdks/subscribers/README.md#retrieve) - Get subscriber
* [patch](docs/sdks/subscribers/README.md#patch) - Patch subscriber
* [delete](docs/sdks/subscribers/README.md#delete) - Delete subscriber
Expand Down Expand Up @@ -533,10 +529,6 @@ asyncio.run(main())
#### [subscribers.preferences](docs/sdks/preferences/README.md)

* [list](docs/sdks/preferences/README.md#list) - Get subscriber preferences
* [update_global](docs/sdks/preferences/README.md#update_global) - Update subscriber global preferences
* [retrieve_by_level](docs/sdks/preferences/README.md#retrieve_by_level) - Get subscriber preferences by level
* [update_legacy](docs/sdks/preferences/README.md#update_legacy) - Update subscriber preference
* [retrieve](docs/sdks/preferences/README.md#retrieve) - Get subscriber preferences
* [update](docs/sdks/preferences/README.md#update) - Update subscriber global or workflow specific preferences

#### [subscribers.properties](docs/sdks/properties/README.md)
Expand Down Expand Up @@ -570,10 +562,10 @@ return value of `Next` is `None`, then there are no more pages to be fetched.
Here's an example of one such pagination call:
```python
from novu_py import Novu
import os


with Novu(
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:

res = novu.subscribers.list()
Expand All @@ -596,10 +588,10 @@ To change the default retry strategy for a single API call, simply provide a `Re
import novu_py
from novu_py import Novu
from novu_py.utils import BackoffStrategy, RetryConfig
import os


with Novu(
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:

res = novu.trigger(trigger_event_request_dto=novu_py.TriggerEventRequestDto(
Expand Down Expand Up @@ -633,11 +625,11 @@ If you'd like to override the default retry strategy for all operations that sup
import novu_py
from novu_py import Novu
from novu_py.utils import BackoffStrategy, RetryConfig
import os


with Novu(
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:

res = novu.trigger(trigger_event_request_dto=novu_py.TriggerEventRequestDto(
Expand Down Expand Up @@ -695,10 +687,10 @@ When custom error responses are specified for an operation, the SDK may also rai
```python
import novu_py
from novu_py import Novu, models
import os


with Novu(
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:
res = None
try:
Expand Down Expand Up @@ -751,21 +743,21 @@ with Novu(

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:

| # | Server |
| --- | ------------------------ |
| 0 | `https://api.novu.co` |
| 1 | `https://eu.api.novu.co` |
| # | Server | Description |
| --- | ------------------------ | ----------- |
| 0 | `https://api.novu.co` | |
| 1 | `https://eu.api.novu.co` | |

#### Example

```python
import novu_py
from novu_py import Novu
import os


with Novu(
server_idx=1,
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:

res = novu.trigger(trigger_event_request_dto=novu_py.TriggerEventRequestDto(
Expand Down Expand Up @@ -799,11 +791,11 @@ The default server can also be overridden globally by passing a URL to the `serv
```python
import novu_py
from novu_py import Novu
import os


with Novu(
server_url="https://api.novu.co",
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:

res = novu.trigger(trigger_event_request_dto=novu_py.TriggerEventRequestDto(
Expand Down Expand Up @@ -928,10 +920,10 @@ To authenticate with the API the `secret_key` parameter must be set when initial
```python
import novu_py
from novu_py import Novu
import os


with Novu(
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:

res = novu.trigger(trigger_event_request_dto=novu_py.TriggerEventRequestDto(
Expand Down Expand Up @@ -969,18 +961,19 @@ The `Novu` class implements the context manager protocol and registers a finaliz

```python
from novu_py import Novu
import os
def main():

with Novu(
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:
# Rest of application here...


# Or when using async:
async def amain():

async with Novu(
secret_key=os.getenv("NOVU_SECRET_KEY", ""),
secret_key="YOUR_SECRET_KEY_HERE",
) as novu:
# Rest of application here...
```
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,14 @@ Based on:
### Generated
- [python v0.3.4] .
### Releases
- [PyPI v0.3.4] https://pypi.org/project/novu-py/0.3.4 - .
- [PyPI v0.3.4] https://pypi.org/project/novu-py/0.3.4 - .

## 2025-03-03 13:30:31
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.508.1 (2.536.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.4.0] .
### Releases
- [PyPI v0.4.0] https://pypi.org/project/novu-py/0.4.0 - .
Loading

0 comments on commit 7568c56

Please sign in to comment.