A client library for accessing Campaigner EDAPI
Project description
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
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 campaigner_edapi_client-1.1.1.tar.gz.
File metadata
- Download URL: campaigner_edapi_client-1.1.1.tar.gz
- Upload date:
- Size: 142.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b3fbc180e410d75edf141cd7a40fe336f8157d7636b4f62f99e3c96e233b0f6
|
|
| MD5 |
aa6197beb4b1ca4fffb1c3290df4f529
|
|
| BLAKE2b-256 |
c29fd6bf8a3e55e40fce0314be30b197ba6e53a0704b9abf3a0df43ff1e031f3
|
Provenance
The following attestation bundles were made for campaigner_edapi_client-1.1.1.tar.gz:
Publisher:
release.yml on MontereyFinancialServices/campaigner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
campaigner_edapi_client-1.1.1.tar.gz -
Subject digest:
5b3fbc180e410d75edf141cd7a40fe336f8157d7636b4f62f99e3c96e233b0f6 - Sigstore transparency entry: 1217970226
- Sigstore integration time:
-
Permalink:
MontereyFinancialServices/campaigner@4fde3980d3311a5dbd68514a5c9bda6b9c92e871 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MontereyFinancialServices
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4fde3980d3311a5dbd68514a5c9bda6b9c92e871 -
Trigger Event:
push
-
Statement type:
File details
Details for the file campaigner_edapi_client-1.1.1-py3-none-any.whl.
File metadata
- Download URL: campaigner_edapi_client-1.1.1-py3-none-any.whl
- Upload date:
- Size: 830.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62bd104fb1e14c9aacf4d5fd72deab51b03e6b2f3fecaa9de2845e13a714d4c6
|
|
| MD5 |
e35e556d2cee49d641381a9754c02cf3
|
|
| BLAKE2b-256 |
dd66f2edf1a3069ffbf8e9656dcb931027ad05f472c11d28e33a663b1694b47b
|
Provenance
The following attestation bundles were made for campaigner_edapi_client-1.1.1-py3-none-any.whl:
Publisher:
release.yml on MontereyFinancialServices/campaigner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
campaigner_edapi_client-1.1.1-py3-none-any.whl -
Subject digest:
62bd104fb1e14c9aacf4d5fd72deab51b03e6b2f3fecaa9de2845e13a714d4c6 - Sigstore transparency entry: 1217970236
- Sigstore integration time:
-
Permalink:
MontereyFinancialServices/campaigner@4fde3980d3311a5dbd68514a5c9bda6b9c92e871 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MontereyFinancialServices
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4fde3980d3311a5dbd68514a5c9bda6b9c92e871 -
Trigger Event:
push
-
Statement type: