A simple urllib3 client is available at examples/python_client.py.
Install the Python dependency:
python3 -m pip install urllib3Submit an image upload and wait for the final result:
python3 examples/python_client.py upload /path/to/image.pngIf API key authentication is enabled:
python3 examples/python_client.py \
--api-key replace-with-a-long-random-secret \
upload /path/to/image.pngSubmit a server-side image path:
python3 examples/python_client.py path /path/to/image.pngUse another task prompt:
python3 examples/python_client.py \
--task-prompt 'OCR with Region' \
upload /path/to/image.pngSend the final job result to a webhook:
python3 examples/python_client.py \
--webhook-url https://example.com/florence-webhook \
upload /path/to/image.pngFetch an existing job:
python3 examples/python_client.py job <job-id>