6.1.1.1.1.3. thyrsis.database.load_chemicals module

load chemical in site database

USAGE

python -m thyrsis.database.load_chemicals chemicals.csv

load chemical into the database

the expected .csv format is:

  • chemicals.csv: “name”, “period”, “atomic_mass”, “radioactive_decay”, “specific_activity”, “water_quality_limit”, “atomic_number”, “masse_number”

thyrsis.database.load_chemicals.get_float(string)

convert a string into float, even with a ‘,’ decimal limit

Parameters

string (string) – value to convert

Returns

converted value

Return type

float

thyrsis.database.load_chemicals.load_chemicals(cur, chemicals)

load chemicals values into the current database

Parameters
  • cur (sqlite3.Cursor) – cursor on a sqlite connection

  • chemicals (string) – path to a csv file of chemicals

Returns

None