chemicalchecker.database.pubchem.Pubchem
- class Pubchem(**kwargs)[source]
Bases:
Base
Pubchem Table class.
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
Method to add a new row to the table.
Add lot of rows to the table.
Method to query table.
Attributes
cid
inchikey
inchikey_pubchem
metadata
name
registry
synonyms
- static add(kwargs)[source]
Method to add a new row to the table.
- Parameters:
kwargs (dict) – The data in dictionary format .
- static add_bulk(data, chunk=1000)[source]
Add lot of rows to the table.
This method allows to load a big amound of rows in one instruction
- Parameters:
data (list) – The data in list format. Each list member is a new row. The order is important.
chunk (int) – The size of the chunks to load data to the database.