Skip to main content

Python client for the Akeneo API REST

Project description

Build Status Documentation Status

Python client for Akeneo PIM API

A simple Python client to use the Akeneo PIM API.

Dependencies are managed with poetry (list of dependencies available in pyproject.toml).

You may install them with:

poetry install --dev

Installation

poetry install pyakeneo

Usage

Initialization of the client

from pyakeneo.client import Client
c = Client(
        AKENEO_URL,
        username=AKENEO_USER,
        password=AKENEO_PASSWORD,
        client_id=AKENEO_CLIENT_ID,
        secret=AKENEO_SECRET,
)

Then, you have a pool for every data type in Akeneo PIM.

# products
c.products.fetch_item('ITEM_SKU')
c.products.fetch_list({'limit': 100, 'page': 1, 'pagination_type': 'page'})

# assets
c.asset_families.assets('asset_family_code').fetch_item('ASSET_CODE')
c.asset_families.assets('asset_family_code').fetch_list({'search': {"code":[{"operator":"IN","value":["CODE_1", "CODE_2"]}]}})

Tests

Run tests as follow:

poetry run nosetests

If tests don’t pass in your environment, please check that dependencies match those described in pyproject.toml. One way to do it is to ensure that poetry runs commands in a dedicated virtualenv by setting environment variable as follow:

poetry install --dev

Tests are provided with mocks, recorded with VCR.py. In case you need to (re)run tests, you should install the dataset in you PIM instance as follow:

Project details


Download files

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

Source Distribution

pyakeneo-1.1.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyakeneo-1.1.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file pyakeneo-1.1.0.tar.gz.

File metadata

  • Download URL: pyakeneo-1.1.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.13 Linux/6.8.0-1044-azure

File hashes

Hashes for pyakeneo-1.1.0.tar.gz
Algorithm Hash digest
SHA256 4932b08a7927b6029af581c5e8101ffe18831e78beb20a26934949f0dcf901b6
MD5 dd174119714e956c6aca76b9e24e819e
BLAKE2b-256 53379aa97245b6c79e509369abe3e473444367c0b4549c45da09c99bff5b61be

See more details on using hashes here.

File details

Details for the file pyakeneo-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyakeneo-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.13 Linux/6.8.0-1044-azure

File hashes

Hashes for pyakeneo-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc2365f57a8398c189d396dcc5e9ac3389378936ca338cc54c9fa3c71113b55c
MD5 61efa353a064b84c437b4977833d069b
BLAKE2b-256 16129ff9326d59e87375cf0653ac3204112e89bb36df7d050595756dfa1fe05d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page