Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
A simple Python client for the Akeneo PIM API
pip install akeneo-api-client
from akeneo_api_client.client_builder import ClientBuilder
from akeneo_api_client.client.akeneo_api_error import AkeneoApiError
cb = ClientBuilder(uri)
api = cb.build_authenticated_by_password(username, password, client_id, secret)
try:
response = api.product_uuid_api.get(uuid)
print(response)
except AkeneoApiError as e:
print(e.response.status_code)
print(e.response_body)
from akeneo_api_client.search.search_builder import SearchBuilder
sb = SearchBuilder()
sb.add_filter('updated', '>', '2023-11-29 00:00:00')
sb.add_filter('completeness', '=', 100, {"scope": "ecommerce"})
sb.add_filter('enabled', '=', True)
search = sb.get_filters()
try:
for page in api.product_uuid_api.all(query_params={"search": search}):
for item in page:
print(item["uuid"])
except AkeneoApiError as e:
print(e.message)
try:
response = api.product_uuid_api.create(data={"family":"my_family"})
print(response.headers.get("location"))
except AkeneoApiError as e:
print(e.response_body)
This call will create a product if it doesn't exist or update it if it does
data = {
"values": {
"Product_name": [
{"scope": None, "locale": "en_GB", "data": "My product"}
]
}
}
try:
api.product_uuid_api.upsert(uuid, data)
except AkeneoApiError as e:
print(e.message)
products = [
{
"uuid": str(uuid.uuid4()),
"values": {
"Product_name": [
{"scope": None, "locale": "en_GB", "data": "Product 1"}
]
}
},
{
"values": {
"Product_name": [
{"scope": None, "locale": "en_GB", "data": "Product 2"}
]
}
}
]
try:
response = api.product_uuid_api.upsert_list(products)
for item in response:
if item['status_code'] >= 400:
print(item)
except AkeneoApiError as e:
print(e.response.reason)
try:
api.product_uuid_api.delete(uuid)
except AkeneoApiError as e:
print(e.response_body)
FAQs
REST API client for Akeneo
We found that akeneo-api-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.