Skip to content

Heffie/postbode-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postbode-python

A Postbode API wrapper for Python. www.postbode.nu is a Dutch web application for digitally sending and receiving postal mail and automation of postal services. This package is a set of python wrappers build around the API of this services.

Getting started

For starters you will need a account and a api token.

Account creation

Go to http://app.postbode.nu and follow registration proces.

API token

After registration go to personal settings -> API and request a token.

Sandbox mode

For testing the api it is usefull to set the mailbox in sandbox mode. A dev mode sort of speak that will prefent any request to be send to production.

further reading

http://api.postbode.nu for more information about the letter and mailbox options

Now you are set to go.

Examples

Instantiate and authenticate with the client

from postbode.client import Client

client = Client('YOUR_API_TOKEN')

Get available mailboxes

from postbode.client import Client

client.get_mailboxes()

Get letters of mailbox

client.get_letters('MAILBOX_ID')

Send letter

from postbode.client import Client

client.send_letter('MAILBOX_ID', 'Filename', './file.pdf','NL', False, 'FC', 'simplex', 'inkjet', True )

Send letters

letters = ('./letter1.pdf','./letter2.pdf','./letter3.pdf')
client.send_letters(2522, 2, 'NL', False, 'FC', 'simplex', 'inkjet', True, *letters)

About

A Postbode API wrapper for Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages