Skip to content

knyazz/python-sendfox-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-sendfox-api on PyPi MIT license Beta

python-sendfox-api

A straighforward python client for Sendfox API

Installation

This client is hosted at PyPi under the name python-sendfox-api, to install it, simply run

pip install python-sendfox-api

Initialization

Grab ACCESS_TOKEN from your SendFox account.

from sendfox import SendFox

client = SendFox('token')

Examples

# returns the paginated lists
client.lists.get_all()

# returns the list matching id '123456'
client.lists.get('123456')

# returns all the campaigns
client.campaigns.get_all()

# You can also disable at runtime with the optional ``enabled`` parameter.
# Every API call will return None
client = SendFox('token', enabled=False)

# You are encouraged to specify a value in seconds for the ``timeout``
# parameter to avoid hanging requests.
client = SendFox('token', timeout=10.0)

# You are encouraged to specify a User-Agent for requests to the SendFox
# API. Headers can be specified using the ``request_headers`` parameter.
headers = requests.utils.default_headers()
headers['User-Agent'] = 'Example (example@example.com)'
client = SendFox('token', request_headers=headers)

About

A straighforward python client for Sendfox API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages