Added v0.6
The Akeneo connector supports reading from an Akeneo PIM and writing to its product list.
read:
- akeneo:
host: https://akeneo.example.com
user: ${AKENEO_USER}
password: ${AKENEO_PASSWORD}
client_id: ${AKENEO_CLIENT_ID}
client_secret: ${AKENEO_CLIENT_SECRET}
source: products
parameters:
search: '{"enabled":[{"operator":"=","value":true}]}'
The connector follows the API's next-page links and combines all returned items. It requests 100 items per page. parameters supplies Akeneo query filters and other query options; columns selects columns from the returned dataframe.
from wrangles.connectors import akeneo
import os
df = akeneo.read(
host="https://akeneo.example.com",
user=os.environ["AKENEO_USER"],
password=os.environ["AKENEO_PASSWORD"],
client_id=os.environ["AKENEO_CLIENT_ID"],
client_secret=os.environ["AKENEO_CLIENT_SECRET"],
source="products",
)
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| host | ✓ | string | Hostname of the Akeneo PIM instance e.g. https://akeneo.example.com |
| user | ✓ | string | User with access to read the data |
| password | ✓ | string | Password for the user |
| client_id | ✓ | string | Client ID. These need to be generated in the PIM. See https://api.akeneo.com/documentation/authentication.html |
| client_secret | ✓ | string | Client Secret |
| source | ✓ | string | Type of data to return Allowed values: products, products-uuid, product-models, media-files, published-products, families, attributes, attribute-groups, association-types, categories, channels, locales, currencies, measure-families, measurement-families, reference-entities, reference-entities-media-files, asset-families, asset-media-files. |
| columns | array | Specify which columns to return | |
| parameters | object | Set parameters for the query such as filtering the results. See the Akeneo query parameters for specifics. e.g. https://api.akeneo.com/api-reference.html#get_products for products. |
write:
- akeneo:
user: user
password: password
host: host_url
client_id: client_id
client_secret: client_secret
locale: product_locale
scope: product_scope
# Optional
columns:
- column1
- column2
from wrangles.connectors import akeneo
akeneo.write(
df,
user='user'
password='password'
host: 'host_url'
client_id: 'client_id'
client_secret: 'client_secret'
locale: 'product_locale'
scope: 'product_scope'
)
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| df | ✓ | DataFrame | Function only. DataFrame of contents to write to the database. Columns must match the target schema. By default, if the target collection doesn't exist, it will be created. DataFrame orient is set to 'records'. |
| user | ✓ | str | User with access to the database |
| password | ✓ | str | Password of user |
| host | ✓ | str | PIM host url |
| client id | ✓ | str | Client ID provided in Connect in Akeneo's Product UI |
| client secret | ✓ | str | Client ID privided in Connect in Akeneo's Product UI |
| locale | str | Product locale | |
| scope | str | Product scope | |
| columns | str | Columns to include in Write function |