FairFood-Connect
The fairfood-connect library provides a set of classes and methods to interact with the FairFood Connect API for managing and accessing data related to buyers, farmers, products, companies, transactions and catalogs. This library allows users to interact with the API endpoints and perform operations like retrieving, creating, updating and deleting data.Installing Fairfood-Connect and Supported Versions
Fairfood-Connect is available on PyPI:Supported Features & Best–Practices
- Create Buyer
- List country and provinces
- Get details of company
- Create, get and update details of farmer
- List Products
- Create and delete Transactions
Example Usage
Initialization
Initialize the connect object with the required parameters: base_url, client_id, client_secret, and entity_id. This will automatically handle the authentication and setup for API requests.Parameters
Name | Description |
---|---|
base_url | The root URL of the API (e.g., {API_ROOT_URL} ) |
client_id | Your client ID provided by FairFood Connect (e.g., {CLIENT_ID} ) |
client_secret | Your client secret provided by FairFood Connect (e.g., {CLIENT_SECRET} ) |
entity_id | The entity ID for your account (e.g., {ENTITY_ID} ) |