Skip to content
Python Wrapper for Lob API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples feat(async): Add async letter creation example. (#151) Jan 10, 2019
lob feat(area-mail): remove areas and routes resources Jun 28, 2018
tests
.coveragerc feat(coverage): increase coverage to 100% Apr 17, 2015
.gitignore chore(lint): fix most linter warnings Nov 2, 2017
.travis.yml chore(versions): Update supported versions: drop 2.6 & 3.3. Oct 30, 2018
CONTRIBUTING.md
LICENSE
MANIFEST.in Update version.py and move MANIFEST to MANIFEST.in Sep 9, 2014
README.md test(api-key): remove lob api key from tests and examples Dec 28, 2018
requirements.txt chore(tests): remove pypy3 and add python 3.6 May 6, 2017
setup.py 3.4.0 May 21, 2018
tox.ini

README.md

lob-python

Build Status PyPI version Coverage Status

This is the python wrapper for the Lob.com API. See full Lob.com documentation here. For best results, be sure that you're using the latest version of the Lob API and the latest version of the python wrapper.

This wrapper supports Python 2.7, 3.4, 3.5, 3.6, pypy, and pypy3 and works in the object oriented style. That is, to make calls you have to call the method on a class and the return types are python objects. To get a dict on any object, you can call the to_dict() method of the object.

Table of Contents

Getting Started

Here's a general overview of the Lob services available, click through to read more.

Please read through the official API Documentation to get a complete sense of what to expect from each endpoint.

Registration

First, you will need to first create an account at Lob.com and obtain your Test and Live API Keys.

Once you have created an account, you can access your API Keys from the Settings Panel.

Installation

You can use pip or easy_install for installing the package.

pip install lob
easy_install lob

To initialize the wrapper, import lob and set the api_key

import lob
lob.api_key = 'your-api-key'

// set an api version (optional)
lob.api_version = 'api-version'

Usage

We've provided an example script you can run in examples/ that has examples of how to use the lob-python wrapper with some of our core endpoints.

Examples

We've provided various examples for you to try out here.

There are simple scripts to demonstrate how to create all the core Lob objects (checks, letters, postcards. etc.) as well as more complex examples that utilize other libraries and external files.

API Documentation

Testing

Install all requirements with pip install -r requirements.txt.

You can run all tests with the command LOB_API_KEY=YOUR_TEST_API_KEY nosetests in the main directory.

=======================

Copyright © 2013 Lob.com

Released under the MIT License, which can be found in the repository in LICENSE.txt.

You can’t perform that action at this time.