Create dataset

for this example you need the following files:

CreateDataset.py

import os

from LOGS import LOGS
from LOGS.Entities import Dataset

# Connect to LOGS
logs = LOGS()

# In this example we assume that the file is next to the script itself
file = os.path.join(os.path.dirname(os.path.realpath(__file__)), "logspy-logo.png")

# The dataset entity differs slightly from other entities as it has to be created
# based on datasets files. Though to create a dataset object we need to specify
# these files as a list and a specific format
dataset = Dataset(files=[file], format="image")

p = logs.project(89)

dataset.projects = [p]

# Create this datset in LOGS
logs.create(dataset)

dataset.printJson()