Skip to main content

Easily use API to get product info from their barcode

Project description API

|PyPI latest version badge| |PyPI monthly downloads|

Python client for the [| API|\ ]


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 objcet to access the

.. code:: python

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``.

.. code:: python


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

.. code:: json

{'attributes': {'Care': 'Dishwasher safe',
'Colors': 'White',
'Manufacturer': 'Progressive International',
'Material': 'Plastic, Stainless Steel',
'Part Number': 'GPC-5000'},
'barcode': '0078915030900',
'images': ['',
'name': 'Progressive International Cherry-It Pitter',
'outpan_url': '',
'videos': ['',

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:

.. code:: python

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:

.. code:: python

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

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


``outpan`` can be installed using the following command:

.. code:: bash

pip install outpan

or using ``easy_install``:

.. code:: bash

easy_install outpan

.. |PyPI latest version badge| image::
.. |PyPI monthly downloads| image::
.. | API| target::
.. |create an account| target::

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for outpan, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size outpan-0.1.1.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page