Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python SDK missing option for Tenant ID in event triggering #94

Closed
IakMastro opened this issue Oct 12, 2023 · 1 comment · Fixed by #95
Closed

Python SDK missing option for Tenant ID in event triggering #94

IakMastro opened this issue Oct 12, 2023 · 1 comment · Fixed by #95
Assignees
Labels
enhancement New feature or request

Comments

@IakMastro
Copy link

Hello,

We want to integrate Novu to our stack. Our stack is based on many multi-tenancy technologies and consists of a main middleware that is written in Python and communicates with each service separately.

I tried to use your Python SDK to trigger specific tenant information. However, I noticed the option to change the tenant is missing from the Trigger function.

For example, in your NodeJS SDK you do it like that:

  import { Novu } from '@novu/node';

  const novu = new Novu("<NOVU_API_KEY>");

  await novu.trigger('<WORKFLOW_TRIGGER_ID>',
    {
      to: {
        subscriberId: '<UNIQUE_SUBSCRIBER_IDENTIFIER>',
      },
      payload: {
        name: "Hello World",
      },
      actor: "actorId"
      tenant: "tenantIdentifier"
    }
  );

In Python, the same function has this parameters:

    def trigger(
            self,
            name: str,
            recipients: Union[str, List[str]],
            payload: dict,
            overrides: Optional[dict] = None,
            transaction_id: Optional[str] = None,
            actor: Optional[str] = None,
    ) -> EventDto:

I can't find where to set up the tenant so my requests will work properly.

@ryshu
Copy link
Collaborator

ryshu commented Oct 14, 2023

Hi @IakMastro,

It seems to be quite blocking indeed when using the "multi-tenant" part. I'm looking to quickly add the field without having a breaking change.

@Cliftonz We should probably do another pass on the SDK with the implementation of the tenants to see where the API methods do not support it.

@ryshu ryshu self-assigned this Oct 14, 2023
@ryshu ryshu added the enhancement New feature or request label Oct 14, 2023
unicodeveloper pushed a commit that referenced this issue Oct 14, 2023
# [1.6.0](v1.5.0...v1.6.0) (2023-10-14)

### Features

* **event:** [#94](#94) - support tenant in event api ([50116d6](50116d6))
meslubi2021 added a commit to meslubi2021/novu-python that referenced this issue Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants