chemicalchecker.database.molrepo.MolrepoHasDatasource

class MolrepoHasDatasource(**kwargs)[source]

Bases: Base

Molrepo-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

datasource_name

metadata

molrepo_name

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.