Floriday Supplier API Client
A Python client for interacting with the Floriday Supplier API. This client provides a clean, type-safe interface to Floriday's supplier endpoints.
Overview
This client library is automatically generated from the Floriday Supplier API OpenAPI/Swagger specification using Swagger Codegen. It provides Python developers with a convenient way to interact with Floriday's supplier services.
Features
- Auto-generated API client from Swagger/OpenAPI specs
- Type-safe API interactions
- Comprehensive API coverage for supplier operations
- Environment-based configuration
- OAuth2 authentication handling
- Support for all Floriday Supplier API endpoints
- Entity synchronization utilities for efficient data retrieval
Installation
Requirements
- Python 3.4+ (developed and tested with Python 3.12)
- Required Python packages (automatically installed as dependencies):
- requests
- urllib3
- certifi
- six
Installation Methods
From GitHub
pip install git+https://github.com/serraict/vine-floriday-python-supplier-api-client
Using Setuptools
python setup.py install --user
Or for all users:
sudo python setup.py install
Configuration
The client requires several environment variables to be set for authentication and API access:
| Variable | Description |
|---|---|
| FLORIDAY_CLIENT_ID | OAuth client ID |
| FLORIDAY_CLIENT_SECRET | OAuth client secret |
| FLORIDAY_API_KEY | API key for Floriday API |
| FLORIDAY_AUTH_URL | Authentication server URL |
| FLORIDAY_BASE_URL | Base URL for API requests |
See .env.example in the repository root for a template.
Basic Usage
Direct API Access
from floriday_supplier_client import TradeItemsApi
from floriday_supplier_client.api_factory import ApiFactory
from floriday_supplier_client.rest import ApiException
# Create API factory and client
factory = ApiFactory()
client = factory.get_api_client()
# Initialize specific API instance
api_instance = TradeItemsApi(client)
try:
# Call API methods
response = api_instance.get_trade_items_summary(
trade_item_ids=["your-trade-item-id"]
)
print(response)
except ApiException as e:
print(f"API Exception: {e}")
Entity Synchronization
The client includes utilities for efficiently synchronizing entities from the Floriday API:
from floriday_supplier_client import TradeItemsApi
from floriday_supplier_client.api_factory import ApiFactory
from floriday_supplier_client.sync import sync_entities
# Create API factory and client
factory = ApiFactory()
client = factory.get_api_client()
api_instance = TradeItemsApi(client)
# Define a persistence function
def persist_trade_item(item):
# In a real application, save to database
print(f"Processing trade item: {item.trade_item_id}")
return item.trade_item_id
# Synchronize trade items
result = sync_entities(
entity_type="trade_items",
fetch_entities_callback=api_instance.get_trade_items_by_sequence_number,
persist_entity_callback=persist_trade_item,
start_seq_number=0
)
# Handle the result
print(f"Processed {result.entities_processed} trade items")
if not result.success:
print(f"Error: {result.error}")
Documentation
- API endpoint documentation is available in the
docs/directory - Example usage can be found in
example.py - For architecture details, see architecture.md
Development
All code in floriday_supplier_client and test directories is generated. Files that should not be overwritten on generation should be included in .swagger-codegen-ignore.
To regenerate the client:
make local_specs # get a local copy of the swagger specification
make client # generate the client
For development and testing:
make bootstrap
./venv/bin/activate
make update
python example.py
Upgrade to a newer version of hte Floriday API
The Floriday API changes roughly twice per year, see Floriday docs.
To update to a newer version:
- change the
API_VERSIONin the makefile - change the
EXPECTED_API_VERSIONin api_factory.py - update the
FLORIDAY_BASE_URLin .env.example
Then regenerate the client and make a new release.
Metadata
Release files for floriday-supplier-client 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| floriday_supplier_client-0.4.1.tar.gz | 639.9 kB | With provenance | Details for floriday_supplier_client-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| floriday_supplier_client-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for floriday_supplier_client-0.4.1-py3-none-any.whl |
Total release size: 2.1 MB
Release files / floriday_supplier_client-0.4.1.tar.gz
| Download URL | floriday_supplier_client-0.4.1.tar.gz |
|---|---|
| Size | 639.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31d9e51cb97b7ac1138b189f3f535115f96882ac4447fa10a3b09886bb6719a5
|
|
BLAKE2b-256 checksum How to use checksums |
0c5b40f1b848701899a297105b1d31e97a3253f837c5c048c8dbc54705535602
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 2, 2026.
Transparency logRelease files / floriday_supplier_client-0.4.1-py3-none-any.whl
| Download URL | floriday_supplier_client-0.4.1-py3-none-any.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d8152ca19670f81e71b84ed0ef97d9a5ddf6f43ef5254a68dab0fa723860f1c7
|
|
BLAKE2b-256 checksum How to use checksums |
28d6343dba3e6cf3cade5ea082bcf49754864cc47b87c961d5da7fc8efde0bc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 2, 2026.
Transparency logSecurity for floriday-supplier-client 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for floriday_supplier_client-0.4.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.