Python SDK
Introduction
Installation
pip install datasherlockQuick Start
from datasherlock import DataSherlock
# Initialize the DataSherlock SDK with api token and database configuration
sherlock = DataSherlock(token="YOUR_API_TOKEN", db_type="mysql", db_config={
'host': "localhost",
'database': "employees",
'user': "root",
'port': 3306,
'password': "college",
'ssl_disabled': True
})
# Register your database with Datasherlock
registration_result = sherlock.register("employees")
print(registration_result)
# Ask a query to retrieve insights, Ask will return you pandas dataframe
query_result = sherlock.ask("List of department")
print(query_result)
DataSherlock Class
SDK Methods
Last updated