Open floodoo opened 8 months ago
I think this only happens if you install the package with pip. I had the same issue. But when I cloned the repo and installed via setup.py, that worked for me. I'm guessing the pypi package just isn't up to date?
Confirming that the pypi package isn't up to date. Running:
pip install git+https://github.com/openfoodfacts/openfoodfacts-python#egg=openfoodfacts
was what fixed it for me.
Issue: User Agent Parameter Missing in OpenFoodFacts SDK Despite Documentation
What
A discrepancy has been identified in the OpenFoodFacts SDK documentation regarding the ability to set a user agent. The documentation suggests setting a user agent during API initialization, but the SDK's
API
class constructor does not support this functionality.Steps to Observe the Discrepancy
user_agent
parameter in theAPI
initialization as follows:API
class constructor in the SDK lacks theuser_agent
parameter:Expected Behavior
The SDK's documentation should accurately reflect its current functionality. If the SDK is intended to support the
user_agent
parameter, this should be correctly implemented. If not, the documentation should be updated to avoid such mentions.Suggested Action
Based on this inconsistency, I recommend either:
user_agent
parameter in theAPI
class constructor as per the documentation.Platform
Context of Discovery
I look forward to a resolution that aligns the SDK with its documentation, ensuring clarity for all future users.