Skip to main content

CLI for Akeneo API

Project description

Akeneo CLI

You'll need to get an app credentials for Akeneo as explain here

This package use generic calls to Akeneo api. To know the list of available endpoints and how the API work please refer to the official documentation

CLI

The CLI itself is a work in progress. Currently only the product can be retrieved with a command like.

source .env #Create your own .env from env.example
akeneo get product

Code

Examples of usage from code

from akeneo_cli.client import AkeneoClient

akeneo_client = AkeneoClient(
    os.getenv(AKENEO_URL),
    os.getenv(AKENEO_CLIENT_ID),
    os.getenv(AKENEO_CLIENT_SECRET),
)

with akeneo_client.login(os.getenv(AKENEO_USERNAME), os.getenv(AKENEO_PASSWORD)) as session:
  product_list = session.get("products")

  product = session.get("products", code="my-product")

  product-model = session.get("product-models", code="some-model")

  response = session.patch("products", code="my-product", data=product_data)

  response = session.post("products", code="my-product", data=product_data)

  response = session.bulk("products", data=[product_data1, product_data2, product_data3])

  response = session.put_product_file("my-product", "my-attribute", "my-filepath", is_model=False, locale=None, scope=None)

  response = session.put_asset_file("my-asset-filepath")

  response = session.delete("products", code="my-product")

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

akeneo-cli-1.0.8.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

akeneo_cli-1.0.8-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file akeneo-cli-1.0.8.tar.gz.

File metadata

  • Download URL: akeneo-cli-1.0.8.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.16

File hashes

Hashes for akeneo-cli-1.0.8.tar.gz
Algorithm Hash digest
SHA256 b8f2817ee89066b4070966a009acecadbaeadb03558e4007b48f1b18cdc94396
MD5 46f19bed080d316ed0eb680077e95ca7
BLAKE2b-256 3facfd01d26ee80985460b6db09b6e06e2d37c398129aca7054b5bd63189c796

See more details on using hashes here.

File details

Details for the file akeneo_cli-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: akeneo_cli-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.16

File hashes

Hashes for akeneo_cli-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b4a5f408cfbc24db1a53fc0afc5c445c46a63831d6808b93d33766fe045f4717
MD5 423aaa76437abe82886d7aeed60d9918
BLAKE2b-256 6d79b9ae66eed2a19363f9e40500716c4ce43f5cc3f8991aa1feaac2c0953734

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