Skip to main content

Unofficial Python SDK for Loops.so email platform

Project description

PyLoops

Unofficial Python SDK for Loops.so.

PyPI version Python 3.12+

Installation

pip install pyloops

Or with uv:

uv add pyloops

Quick Start

from pyloops import Client

# Initialize the client with your API key
client = Client(base_url="https://app.loops.so/api/v1", token="your_api_key_here")

# Create a contact
from pyloops.api.contacts import create_contact
from pyloops.models import CreateContactBody

response = create_contact.sync(
    client=client,
    body=CreateContactBody(
        email="user@example.com",
        first_name="John",
        last_name="Doe"
    )
)

print(response)

Authentication

All API calls require a Loops API key. Get your API key from your Loops account settings.

from pyloops import Client

client = Client(
    base_url="https://app.loops.so/api/v1",
    token="your_api_key_here"
)

Features

This SDK provides access to all Loops.so API endpoints:

  • Contacts: Create, update, find, and delete contacts
  • Contact Properties: Manage custom contact properties
  • Mailing Lists: View available mailing lists
  • Events: Trigger event-based emails
  • Transactional Emails: Send and list transactional emails
  • Sending IPs: Retrieve dedicated sending IP addresses

Documentation

For detailed API documentation, visit the Loops.so API docs.

Automated Updates

This SDK is automatically updated to match the latest Loops.so API specification. The package version corresponds to the Loops API version (current: 1.6.0).

A GitHub Action checks for API updates daily and creates a pull request when changes are detected. After review and merge, a new version is automatically published to PyPI.

Development

Setup

# Clone the repository
git clone https://github.com/doctorgpt-corp/pyloops.git
cd pyloops

# Install dependencies with uv
uv sync

Regenerate SDK

To manually regenerate the SDK from the latest OpenAPI spec:

uv run openapi-python-client generate --url https://app.loops.so/openapi.yaml --meta uv
cp -r loops-open-api-spec-client/loops_open_api_spec_client/* src/pyloops/
rm -rf loops-open-api-spec-client

License

MIT

Disclaimer

This is an unofficial SDK and is not affiliated with or endorsed by Loops.so.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyloops-1.6.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyloops-1.6.0-py3-none-any.whl (56.3 kB view details)

Uploaded Python 3

File details

Details for the file pyloops-1.6.0.tar.gz.

File metadata

  • Download URL: pyloops-1.6.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyloops-1.6.0.tar.gz
Algorithm Hash digest
SHA256 c01e8255e74f799a79558fd4c5c339b9c2f2c78b8d3ab1e0de6e7933e6275e10
MD5 b8de16bae429037935cc56f6e6b4fdd5
BLAKE2b-256 706dbb9a3f2e16bc4edd2020003ddab85cc3526f4ca92879e15c7e24423407c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyloops-1.6.0.tar.gz:

Publisher: publish.yml on doctorgpt-corp/pyloops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyloops-1.6.0-py3-none-any.whl.

File metadata

  • Download URL: pyloops-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 56.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyloops-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fdb80c111a4ef63f232dae74027d2a2f5c9e9e26b5d857014c7fafcc861c7d2e
MD5 41676dc9ca0ad8a7d7822f81d6983bec
BLAKE2b-256 b35e0f9bd0f979bcf43ab539bda64756a2b1281ac5719905be70b32542678c17

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyloops-1.6.0-py3-none-any.whl:

Publisher: publish.yml on doctorgpt-corp/pyloops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page