Python REST API Client
Install
poetry add autoblocksai
AutoblocksAPIClient
The AutoblocksAPIClient
allows you to interact with the Autoblocks REST API.
It can be initialized without any arguments if your API key
is set as an environment variable named AUTOBLOCKS_API_KEY
.
Python
from autoblocks.api.client import AutoblocksAPIClient
client = AutoblocksAPIClient()
Otherwise, you can pass the API key as an argument:
Python
client = AutoblocksAPIClient("your-api-key")
There are additional arguments that you can use to further configure the client:
- Name
timeout
- Type
- timedelta | undefined
- Description
The timeout for each HTTP request to the Autoblocks REST API. Default value is
timedelta(seconds=10)
.The
timeout
property should be an instance ofdatetime.timedelta
.
Python
from datetime import timedelta
client = AutoblocksAPIClient(
timeout=timedelta(seconds=30),
)
See the REST API documentation for more details on all of the endpoints exposed through this client.