Reloop Python SDK
Project description
Reloop Python SDK
The official Python SDK for Reloop, modeled after the Stripe Python SDK with snake_case parameters and typed resource responses.
Requirements
- Python 3.9 or higher
Installation
pip install reloop-email
Getting Started
from reloop_email import Reloop
reloop = Reloop(api_key="re_123456789")
# or
reloop = Reloop.client("re_123456789")
API Keys
reloop = Reloop(api_key="rl_123456789")
reloop.api_keys.list(page=1, limit=10)
reloop.api_keys.create(
name="Production key",
enabled=True,
rate_limit_enabled=True,
)
reloop.api_keys.get("key_123456789")
reloop.api_keys.update("key_123456789", name="Renamed key")
reloop.api_keys.rotate("key_123456789")
reloop.api_keys.disable("key_123456789")
reloop.api_keys.pause("key_123456789")
reloop.api_keys.enable("key_123456789")
reloop.api_keys.delete("key_123456789")
Domains
Add, verify, and manage sending domains. Request parameters use snake_case; responses expose snake_case attributes.
reloop = Reloop(api_key="rl_123456789")
created = reloop.domain.create(
domain="send.example.com",
custom_return_path="inbound",
click_tracking=True,
open_tracking=True,
tls="opportunistic",
sending_email=True,
receiving_email=True,
)
domains = reloop.domain.list(page=1, limit=10, status="active")
one = reloop.domain.get("domain_123456789")
reloop.domain.update(
"domain_123456789",
click_tracking=False,
sending_email=True,
)
reloop.domain.verify("domain_123456789")
reloop.domain.forward_dns("domain_123456789", email="admin@example.com")
nameservers = reloop.domain.get_nameservers("domain_123456789")
print(nameservers.dns_provider, nameservers.nameservers)
reloop.domain.delete("domain_123456789")
Contacts
Manage contacts, custom properties, groups, and channels. Methods accept snake_case keyword arguments and return resource objects with snake_case attributes.
Create a contact
reloop = Reloop(api_key="re_123456789")
contact = reloop.contacts.create(
email="steve.wozniak@gmail.com",
first_name="Steve",
last_name="Wozniak",
unsubscribed=False,
)
print(contact.email)
print(contact.first_name)
List and update contacts
contacts = reloop.contacts.list(page=1, limit=10)
print(contacts.contacts, contacts.total)
reloop.contacts.update(
"cont_123456789",
first_name="Steve",
unsubscribed=False,
)
Groups and channels
reloop.contacts.groups.add_contact(
"grp_123456789",
contact_id="cont_123456789",
)
reloop.contacts.channels.create(
name="Product Updates",
default_subscription="opt_in",
)
Error Handling
from reloop_email import Reloop, ReloopApiError
reloop = Reloop(api_key="re_123456789")
try:
reloop.contacts.get("cont_invalid")
except ReloopApiError as error:
print(error.status_code, error.body)
Context Manager
with Reloop(api_key="re_123456789") as reloop:
reloop.contacts.list(limit=10)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reloop_email-0.2.0.tar.gz.
File metadata
- Download URL: reloop_email-0.2.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6653cf7166cd626c58b5d8ea6e63351bbebd9ac5772d370f7dc5963dd8315e4
|
|
| MD5 |
98f56f4d760690c969940aeb9a733331
|
|
| BLAKE2b-256 |
4c0329c453635dbb843deff7c4fc951beda1aa1fdbec23a78d7ac166fbe565bd
|
Provenance
The following attestation bundles were made for reloop_email-0.2.0.tar.gz:
Publisher:
publish.yml on reloop-labs/reloop-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reloop_email-0.2.0.tar.gz -
Subject digest:
d6653cf7166cd626c58b5d8ea6e63351bbebd9ac5772d370f7dc5963dd8315e4 - Sigstore transparency entry: 1809440766
- Sigstore integration time:
-
Permalink:
reloop-labs/reloop-python@f346e35e9ea012179d4e320d8ca65060a49c5bec -
Branch / Tag:
refs/heads/main - Owner: https://github.com/reloop-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f346e35e9ea012179d4e320d8ca65060a49c5bec -
Trigger Event:
push
-
Statement type:
File details
Details for the file reloop_email-0.2.0-py3-none-any.whl.
File metadata
- Download URL: reloop_email-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1678d0ddbc34beea04b0000915e388cbba6ce30745eeffd8804f780a2f76ded9
|
|
| MD5 |
cb5f1a89d377ef63d6099e558c35b6bd
|
|
| BLAKE2b-256 |
68cb8ced1269e32e91e87d6cc2c92b6314e9e81cd00a643c75bc1abcadd8a9eb
|
Provenance
The following attestation bundles were made for reloop_email-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on reloop-labs/reloop-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reloop_email-0.2.0-py3-none-any.whl -
Subject digest:
1678d0ddbc34beea04b0000915e388cbba6ce30745eeffd8804f780a2f76ded9 - Sigstore transparency entry: 1809440783
- Sigstore integration time:
-
Permalink:
reloop-labs/reloop-python@f346e35e9ea012179d4e320d8ca65060a49c5bec -
Branch / Tag:
refs/heads/main - Owner: https://github.com/reloop-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f346e35e9ea012179d4e320d8ca65060a49c5bec -
Trigger Event:
push
-
Statement type: