Django wrapper for the ExactTarget FuelSDK.
Project description
django-fuelsdk
==============
ExactTarget FuelSDK wrapper for Django.

Install
=======
**Install Dependencies**
```bash
pip install -r requirements.txt
```
**Add To INSTALLED_APPS**
```python
INSTALLED_APPS = [
# ...
django_fuelsdk,
]
```
**Add Settings**
```python
EXACT_TARGET_CLIENT_ID = 'xxxx'
EXACT_TARGET_CLIENT_SECRET = 'xxxx'
# https://code.exacttarget.com/question/there-any-cetificrate-install-our-server-access-et-api
EXACT_TARGET_WSDL_URL = 'https://webservice.exacttarget.com/etframework.wsdl'
```
Usage
=====
```python
from django_fuelsdk.fuel import FuelClient
f = FuelClient()
# Send a triggered send to a specific subscriber (used for transactional email)
f.send('Welcome', 'test@example.com', {'variable': 'test'})
# Add a subscriber
# Note: The underlying ExactTarget API throws an error when trying to
# add a subscriber that already exists. This method will silence that error,
# making add_subscriber idempotent.
f.add_subscriber('test@example.com', {'variable': 'test'})
# Any error returned by the API will cause a django_fuelsdk.fuel.FuelApiError
# exception to be raised.
f.send('Not an Email', 'test@example.com', {})
```
==============
ExactTarget FuelSDK wrapper for Django.

Install
=======
**Install Dependencies**
```bash
pip install -r requirements.txt
```
**Add To INSTALLED_APPS**
```python
INSTALLED_APPS = [
# ...
django_fuelsdk,
]
```
**Add Settings**
```python
EXACT_TARGET_CLIENT_ID = 'xxxx'
EXACT_TARGET_CLIENT_SECRET = 'xxxx'
# https://code.exacttarget.com/question/there-any-cetificrate-install-our-server-access-et-api
EXACT_TARGET_WSDL_URL = 'https://webservice.exacttarget.com/etframework.wsdl'
```
Usage
=====
```python
from django_fuelsdk.fuel import FuelClient
f = FuelClient()
# Send a triggered send to a specific subscriber (used for transactional email)
f.send('Welcome', 'test@example.com', {'variable': 'test'})
# Add a subscriber
# Note: The underlying ExactTarget API throws an error when trying to
# add a subscriber that already exists. This method will silence that error,
# making add_subscriber idempotent.
f.add_subscriber('test@example.com', {'variable': 'test'})
# Any error returned by the API will cause a django_fuelsdk.fuel.FuelApiError
# exception to be raised.
f.send('Not an Email', 'test@example.com', {})
```
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
django-fuelsdk-0.2.tar.gz
(4.6 kB
view details)
File details
Details for the file django-fuelsdk-0.2.tar.gz
.
File metadata
- Download URL: django-fuelsdk-0.2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b84a1ab75fedc6b6418cccef8915df748c7f0917e2293eac87125d43c0e425a |
|
MD5 | 126d1ccbca1183d903662f1fc120cde9 |
|
BLAKE2b-256 | bb383d2b8f4f9a41294476fa6e11a725e783d686514094949da58a071b28e948 |