chemicalchecker.database.dataset.DatasetHasDatasource

class DatasetHasDatasource(**kwargs)[source]

Bases: Base

Dataset-Datasource relationship.

Many-to-Many relationship.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

Methods

add

Add a new row to the table.

from_csv

Add entries from CSV file.

Attributes

dataset_code

datasource_name

metadata

registry

__repr__()[source]

String representation.

static add(kwargs)[source]

Add a new row to the table.

Parameters:

kwargs (dict) – The data in dictionary format.

static from_csv(filename)[source]

Add entries from CSV file.

Parameters:

filename (str) – Path to a CSV file.