This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Python client for the Outpan.com API

Usage

You’ll first need to create an account and get your API key.

Once you have your API key and the package is installed - see below - you are set and ready to go.

Getting ready

To access the Outpan API you’ll need to create an instance of OutpanApi with your API key. You’ll use this object to access the API.

from outpan import OutpanApi
api = OutpanApi(my_api_key)

Getting a product’s data

Now that you are set it is time to make calls to the API. The first thing you will want to do is retrieve a product information. For our test we’ll use the test barcode 078915030900.

api.get_product("078915030900")

This call will return the product’s data as a dict:

{'attributes': {'Care': 'Dishwasher safe',
                'Colors': 'White',
                'Manufacturer': 'Progressive International',
                'Material': 'Plastic, Stainless Steel',
                'Part Number': 'GPC-5000'},
 'gtin': '0078915030900',
 'images': ['https://outpan-images.s3.amazonaws.com/rg6j1l9iqd-0078915030900.jpg',
            'https://outpan-images.s3.amazonaws.com/835ggkjjq0-0078915030900.png',
            'https://outpan-images.s3.amazonaws.com/8fn652ptobh3ecw886.jpg',
            'https://outpan-images.s3.amazonaws.com/26naopw9flteq3qrcs.jpg',
            'https://outpan-images.s3.amazonaws.com/uhqq6sdj47-0078915030900.jpg'],
 'name': 'Progressive International Cherry-It Pitter',
 'videos': ['https://outpan-images.s3.amazonaws.com/lo0e22j0nj-0078915030900.mp4',
            'https://outpan-images.s3.amazonaws.com/nkvaonl839-0078915030900.mp4',
            'https://outpan-images.s3.amazonaws.com/pjkhqlbgwl-0078915030900.mp4']}

Accessing v1 API

Available until Jan. 1st 2016, the v1 API allows you to retrieve specific attributes of a product using the methods list below:

from outpan import OutpanApiV1  # Note that we are importing a different class

api = OutpanApiV1(my_api_key)
api.name("078915030900")
api.attributes("078915030900")
api.images("078915030900")
api.videos("078915030900")

The output of these calls is the dict as returned by the API.

From the command line

Thanks to the awesome python package parse_this the Outpan API is accessible directly from the command line!!!

python outpan.py --help

will give you the help message to know how to use it.

A quick overview of the previous methods we’ve already talked about:

python outpan.py 123456789 get-product 0796435419035  # Available for v2
python outpan.py 123456789 name 0796435419035
python outpan.py 123456789 attributes 0796435419035
python outpan.py 123456789 images 0796435419035
python outpan.py 123456789 videos 0796435419035

These command lines use the (fake) API key 123456789 to 1. Retrieve the full info of product 0796435419035 - only command available for v2 2. Retrieve the name of product 0796435419035 3. Retrieve the attributes of product 0796435419035 4. Retrieve the image links of product 0796435419035 5. Retrieve the video links of product 0796435419035

Creating or editing a product’s name

If you want to create a new object or edit an existing product you can use the method api.add_edit_product_name as showed below:

api.add_edit_product_name("078915030900", "new_name")

Note that this method does not return anything and will replace any existing name.

Creating or editing a product’s attribute

You can also edit or create a product’s attribute using the method add_edit_product_attribute as follow:

api.add_edit_product_attribute("078915030900", "attribute_name", "attribute_value")

Note that this method does not return anything and will replace any existing attribute.

INSTALLING OUTPAN

outpan can be installed using the following command:

pip install outpan

or using easy_install:

easy_install outpan
Release History

Release History

2.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
outpan-2.0.tar.gz (4.5 kB) Copy SHA256 Checksum SHA256 Source Nov 18, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting