Introduction & Installation
Open Source SDK
Check out the open-source Github Repo
Introduction
In addition to the Python SDK documentation, all Guides showcase code examples in Python.
Installation
To install the Python client, run the following command:
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.
--preload
flag.To instantiate the synchronous client:
or, async:
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.
Disable Logging
When instantiating the client, you have the option to disable logging. This can be useful when you want to disable the logs without changing the code.
Was this page helpful?