Skip to main content

Sendlix Python SDK

This package provides a Python implementation of the Sendlix gRPC SDK that aims for feature parity with the official reference client. It exposes the same high-level clients (EmailClient, GroupClient) and the same authentication helper (Auth).

Installation

pip install sendlix

Authentication

API keys are issued in the format secret.keyId. You can either pass the key string directly to a client or create a reusable Auth instance:

from sendlix import Auth, EmailClient

auth = Auth("sk_xxxxxxxxx.xxx")
email_client = EmailClient(auth)
# or
email_client = EmailClient("sk_xxxxxxxxx.xxx")

The token fetched by Auth is cached until it expires.

Available Clients

EmailClient

Send transactional emails, raw EML messages, or trigger group emails.

Methods:

  • send_email(mail_options, additional_options=None) – send a regular email with to, cc, bcc, html/text, attachments, and inline images.
  • send_eml_email(eml, additional_options=None) – upload raw EML content from a path, bytes, or buffer.
  • send_group_email(group_mail) – broadcast to a predefined Sendlix group.

GroupClient

Manage recipients inside Sendlix groups.

  • insert_email_into_group(group_id, email_records, fail_handling="ABORT")
  • delete_email_from_group(group_id, email)
  • contains_email_in_group(group_id, email)

Each method mirrors the semantics and error handling described in the reference SDK documentation.

Examples

Sending an email

from sendlix import EmailClient

client = EmailClient("sk_xxxxxxxxx.xxx")

response = client.send_email(
    {
        "from": {"email": "sender@example.com", "name": "Sender"},
        "to": ["recipient@example.com"],
        "subject": "Hello World!",
        "html": "<h1>Welcome!</h1><p>This is a test email.</p>",
    }
)
print(response)

Adding emails to a group

from sendlix import GroupClient

group_client = GroupClient("sk_xxxxxxxxx.xxx")

group_client.insert_email_into_group(
    "groupId123",
    [
        {"email": "a@example.com"},
        {
            "email": {"email": "b@example.com", "name": "User B"},
            "substitutions": {"plan": "pro"},
        },
    ],
)

Development

  • Regenerate gRPC stubs: .\build.cmd
  • Run tests: pytest

Local quickstart

If you are working from a clone of this repository (instead of the published pip install sendlix package), make sure you run the code inside the provided virtual environment so that the correct dependency versions (especially protobuf>=5.29.0) are available:

python -m venv .venv
./.venv/Scripts/Activate.ps1
python -m pip install --upgrade pip
python -m pip install -e .[dev]

Running the SDK with an older global installation of google.protobuf (<5.29) will raise an ImportError: cannot import name 'runtime_version' when the generated gRPC stubs are imported. Activating the virtual environment (or upgrading protobuf in your global interpreter) resolves the issue.

The project uses the Apache-2.0 license.

Metadata

Release files for sendlix 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sendlix 1.0.0
File Size Uploaded
sendlix-1.0.0.tar.gz 19.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sendlix 1.0.0
File Interpreter ABI Platform
sendlix-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.8 kB

Release files / sendlix-1.0.0.tar.gz

Download URL sendlix-1.0.0.tar.gz
Size 19.6 kB
Tags Source
SHA-256 checksum
How to use checksums
81ff9594c3142152c60582976450b8792c7af982fc84f93cb1ab8936d15e6a30
BLAKE2b-256 checksum
How to use checksums
abc993cfb0f89769ea8d206988e742bcb045349fc939c6f1fecfcb5bd964258c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 27, 2025.

Transparency log

Release files / sendlix-1.0.0-py3-none-any.whl

Download URL sendlix-1.0.0-py3-none-any.whl
Size 24.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08a2dd7bb141dc1d09c31e690c236b260858ee37b96b61c55966030b1482ce39
BLAKE2b-256 checksum
How to use checksums
3757309673c57bd88934d334a36bc62d2e9b68cb108c5fbb19f5898de24feb15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 27, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page