To install the Python client, run the following command:
Copy
pip install literalai
You can use either the synchronous or asynchronous Literal AI Python client.All APIs can be used both sync or async, except for functions on Dataset, which are always sync. All examples in the documentation are, for simplicity, using the synchronous client.If you want to use the async functions, make sure to await the functions.
The Python client is not compatible with gunicorn’s --preload flag.
Additionally, you can pass the optional batch_size argument to batch multiple events - handled simultaneously by Literal.
Events are batched up to batch_size. Defaults to 5.