campaigner-edapi-client
A Python client library for accessing the Campaigner EDAPI.
Installation
pip install campaigner-edapi-client
Or with uv:
uv add campaigner-edapi-client
Usage
First, create a client:
from campaigner_edapi_client import AuthenticatedClient
client = AuthenticatedClient(base_url="https://edapi.campaigner.com", token="your-api-key")
Now call your endpoint and use your models:
from campaigner_edapi_client.api.campaigns import get_campaigns
from campaigner_edapi_client.types import Response
with client as client:
campaigns = get_campaigns.sync(client=client)
# or if you need more info (e.g. status_code)
response: Response = get_campaigns.sync_detailed(client=client)
Or do the same thing with an async version:
async with client as client:
campaigns = await get_campaigns.asyncio(client=client)
response = await get_campaigns.asyncio_detailed(client=client)
Available API Modules
All endpoint functions live under campaigner_edapi_client.api:
| Module | Description |
|---|---|
bounces |
Bounce management |
campaigns |
Campaign CRUD and activation |
creatives |
Email creative/template management |
database |
Database field operations |
file_imports |
File import operations |
filters |
Subscriber filter management |
ftp |
FTP operations |
image_library |
Image library management |
image_upload |
Image upload operations |
lists |
Mailing list management |
orders |
Order management |
ping |
API health check |
products |
Product catalog |
product_categories |
Product category management |
publications |
Publication management |
relay_sends |
Transactional/relay sends |
short_urls |
URL shortening |
smtp |
SMTP relay |
sources |
Source tracking |
subscribers |
Subscriber management |
suppression_lists |
Suppression list management |
workflows |
Automation workflow management |
API Pattern
Every path/method combo becomes a Python module with four functions:
| Function | Description |
|---|---|
sync |
Blocking request, returns parsed data or None |
sync_detailed |
Blocking request, returns full Response with status code |
asyncio |
Async version of sync |
asyncio_detailed |
Async version of sync_detailed |
All path/query params and request bodies become function arguments.
SSL Configuration
Custom certificate bundle:
client = AuthenticatedClient(
base_url="https://edapi.campaigner.com",
token="your-api-key",
verify_ssl="/path/to/certificate_bundle.pem",
)
Advanced Customization
You can customize the underlying httpx.Client or httpx.AsyncClient:
from campaigner_edapi_client import AuthenticatedClient
def log_request(request):
print(f"{request.method} {request.url}")
def log_response(response):
print(f"{response.status_code}")
client = AuthenticatedClient(
base_url="https://edapi.campaigner.com",
token="your-api-key",
httpx_args={"event_hooks": {"request": [log_request], "response": [log_response]}},
)
Building / Publishing
This package is automatically published to PyPI via GitHub Actions when the version in pyproject.toml is bumped on main. To release a new version:
- Update
versioninpyproject.toml - Merge to
main - The release workflow will create a git tag and publish to PyPI
For local development in another project:
uv add campaigner-edapi-client --dev --editable ../campaigner/sdk/python
Release files for campaigner-edapi-client 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| campaigner_edapi_client-1.1.1.tar.gz | 142.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| campaigner_edapi_client-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 973.2 kB
Release files / campaigner_edapi_client-1.1.1.tar.gz
| Download URL | campaigner_edapi_client-1.1.1.tar.gz |
|---|---|
| Size | 142.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5b3fbc180e410d75edf141cd7a40fe336f8157d7636b4f62f99e3c96e233b0f6
|
|
BLAKE2b-256 checksum How to use checksums |
c29fd6bf8a3e55e40fce0314be30b197ba6e53a0704b9abf3a0df43ff1e031f3
|
| 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 Apr 2, 2026.
Transparency logRelease files / campaigner_edapi_client-1.1.1-py3-none-any.whl
| Download URL | campaigner_edapi_client-1.1.1-py3-none-any.whl |
|---|---|
| Size | 830.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62bd104fb1e14c9aacf4d5fd72deab51b03e6b2f3fecaa9de2845e13a714d4c6
|
|
BLAKE2b-256 checksum How to use checksums |
dd66f2edf1a3069ffbf8e9656dcb931027ad05f472c11d28e33a663b1694b47b
|
| 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 Apr 2, 2026.
Transparency log