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 pipenv (list of dependencies available in Pipfile).

You may install them with:

pipenv install --dev

Installation

The easiest is to use pipenv in your new project:

pipenv install git+https://github.com/matthieudelaro/akeneo_api_client#egg=akeneo_api_client

Usage

A simple example is provided in docs/example.py.

To export the data from your PIM, you may use the docs/example_exporter.py.

If you experience issues when importing modules, run the examples as follow:

cd docs
pipenv run python3 example_exporter.py

Tests

Run tests as follow:

pipenv run nosetests

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

export PIPENV_IGNORE_VIRTUALENVS=1
pipenv install --dev  # (re)run installation of dependencies

Or even emulate Travis in Docker:

# This will:
# - copy the current directory into a temporary directory, which will be mounted in (and modified by) a docker container
# - run the container of Travis as explained here: https://stackoverflow.com/a/49019950
# - run the steps of Travis thanks to wwtd: https://github.com/grosser/wwtd
rm -rf /tmp/localTravis; cp -R . /tmp/localTravis; INSTANCE="travisci/ci-garnet:packer-1512502276-986baf0"; BUILDID="build-$RANDOM"; docker run --name $BUILDID -dit -v /tmp/localTravis:/home/travis/matthieudelaro/akeneo_api_client $INSTANCE /sbin/init; docker exec -it --user travis $BUILDID bash -lc "whoami; cd /home/travis/matthieudelaro/akeneo_api_client; gem install wwtd; source ~/virtualenv/python3.6/bin/activate; wwtd -u before_install -u install -u before_script -u language -u python; history; bash"

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:

  • specify the database to install in app/config/parameters.yml:

installer_data: PimInstallerBundle:icecat_demo_dev
  • install the database by running the following command:

    bin/console pim:installer:db --env=prod
    # or, in case you are using Docker:
    docker-compose exec fpm bin/console pim:installer:db --env=prod

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-0.1.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

pyakeneo-0.1.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyakeneo-0.1.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.4 Linux/5.19.0-76051900-generic

File hashes

Hashes for pyakeneo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3ea147c2223f2aa7bc403d96a173aa0c094e673eebf5e62852cdedd517052c3f
MD5 8c905673545fbfe2e1147572d362f0c7
BLAKE2b-256 0238ad66b619b28036dba81a612c9cb2486620a7a73ae78db470ffb0e401108c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyakeneo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.4 Linux/5.19.0-76051900-generic

File hashes

Hashes for pyakeneo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 782d8be22d09fcf7f523ddd02bcbdee4d08ba8c8be0939be5b56d67b32f1227b
MD5 621c9238c32966218ed4ccfc2671b6d5
BLAKE2b-256 ea5eac6548e64a09b58e892c64d97c682160c3826cbc03dfe6f516918c9d4e1b

See more details on using hashes here.

Supported by

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