Add data to a namespace. This method returns immediately; data is processed asynchronously.
Parameters
namespace: str
The namespace to ingest data into
Returns
Add data
import os
from safetykit import Safetykit
client = Safetykit(
api_key=os.environ.get("SAFETYKIT_API_KEY"), # This is the default and can be omitted
)
response = client.data.add(
namespace="namespace",
data=None,
schema={
"profile_image": {
"content_type": "image_url"
},
"cover_photo": {
"content_type": "image_url"
},
"website": {
"content_type": "website_url"
},
},
)
print(response.request_id)
{
"requestId": "req_01h2m7qdmdjckc30e1mnq6xqfd",
"status": "accepted"
}
Returns Examples
{
"requestId": "req_01h2m7qdmdjckc30e1mnq6xqfd",
"status": "accepted"
}