Substances
albert.collections.substance
BaseCollection
BaseCollection(*, session: AlbertSession)
BaseCollection is the base class for all collection classes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
AlbertSession
|
The Albert API Session instance. |
required |
Source code in src/albert/collections/base.py
SubstanceInfo
Bases: BaseAlbertModel
SubstanceInfo is a Pydantic model representing information about a chemical substance.
Attributes:
| Name | Type | Description |
|---|---|---|
acute_dermal_tox_info |
list[ToxicityInfo] | None
|
Information about acute dermal toxicity. |
acute_inhalation_tox_info |
list[ToxicityInfo] | None
|
Information about acute inhalation toxicity. |
acute_oral_tox_info |
list[ToxicityInfo] | None
|
Information about acute oral toxicity. |
acute_tox_info |
list[ToxicityInfo] | None
|
General acute toxicity information. |
bio_accumulative_info |
list[BioAccumulativeInfo] | None
|
Information about bioaccumulation. |
boiling_point_info |
list[BoilingPointInfo] | None
|
Information about boiling points. |
cas_id |
str
|
The CAS ID of the substance. |
classification |
str | None
|
The classification of the substance. |
classification_type |
str
|
The type of classification. |
degradability_info |
list[DegradabilityInfo] | None
|
Information about degradability. |
dnel_info |
list[DNELInfo] | None
|
Information about the Derived No Effect Level (DNEL). |
ec_list_no |
str
|
The EC list number. |
exposure_controls_acgih |
list[ExposureControl] | None
|
ACGIH exposure controls. |
hazards |
list[Hazard] | None
|
List of hazards associated with the substance. |
iarc_carcinogen |
str | None
|
IARC carcinogen classification. |
ntp_carcinogen |
str | None
|
NTP carcinogen classification. |
osha_carcinogen |
bool | None
|
OSHA carcinogen classification. |
health_effects |
str | None
|
Information about health effects. |
name |
list[SubstanceName] | None
|
Names of the substance. |
page_number |
int | None
|
Page number for reference. |
aicis_notified |
bool | None
|
Indicates if AICIS has been notified. |
approved_legal_entities |
Any | None
|
Approved legal entities for the substance. |
aspiration_tox_info |
list[Any] | None
|
Information about aspiration toxicity. |
basel_conv_list |
bool | None
|
Indicates if the substance is on the Basel Convention list. |
bei_info |
list[Any] | None
|
Information related to BEI. |
caa_cfr40 |
bool | None
|
Indicates compliance with CAA CFR 40. |
caa_hpa |
bool | None
|
Indicates compliance with CAA HPA. |
canada_inventory_status |
str | None
|
Status in the Canadian inventory. |
carcinogen_info |
list[Any] | None
|
Information about carcinogenicity. |
chemical_category |
list[str] | None
|
Categories of the chemical. |
dermal_acute_toxicity |
float | None
|
Acute dermal toxicity value. |
inhalation_acute_toxicity |
float | None
|
Acute inhalation toxicity value. |
oral_acute_toxicity |
float | None
|
Acute oral toxicity value. |
lethal_dose_and_concentrations |
list[LethalDoseConcentration] | None
|
Information about lethal doses and concentrations. |
m_factor |
int | None
|
M factor for acute toxicity. |
m_factor_chronic |
int | None
|
M factor for chronic toxicity. |
molecular_weight |
list[MolecularWeight] | None
|
Molecular weight information. |
rsl |
RSL | None
|
Risk-based screening level. |
specific_conc_eu |
list[SpecificConcentration] | None
|
Specific concentration information for the EU. |
specific_conc_source |
str | None
|
Source of specific concentration information. |
sustainability_status_lbc |
str | None
|
Sustainability status under LBC. |
tsca_8b |
bool | None
|
Indicates compliance with TSCA 8(b). |
cdsa_list |
bool | None
|
Indicates if the substance is on the CDSA list. |
cn_csdc_regulations |
bool | None
|
Compliance with CN CSDC regulations. |
cn_pcod_list |
bool | None
|
Indicates if the substance is on the CN PCOD list. |
cn_priority_list |
bool | None
|
Indicates if the substance is on the CN priority list. |
ec_notified |
str | None
|
Notification status in the EC. |
eu_annex_14_substances_list |
bool | None
|
Indicates if the substance is on the EU Annex 14 list. |
eu_annex_17_restrictions_list |
bool | None
|
Indicates if the substance is on the EU Annex 17 restrictions list. |
eu_annex_17_substances_list |
bool | None
|
Indicates if the substance is on the EU Annex 17 substances list. |
eu_candidate_list |
bool | None
|
Indicates if the substance is on the EU candidate list. |
eu_dang_chem_annex_1_part_1_list |
bool | None
|
Indicates if the substance is on the EU dangerous chemicals Annex 1 Part 1 list. |
eu_dang_chem_annex_1_part_2_list |
bool | None
|
Indicates if the substance is on the EU dangerous chemicals Annex 1 Part 2 list. |
eu_dang_chem_annex_1_part_3_list |
bool | None
|
Indicates if the substance is on the EU dangerous chemicals Annex 1 Part 3 list. |
eu_dang_chem_annex_5_list |
bool | None
|
Indicates if the substance is on the EU dangerous chemicals Annex 5 list. |
eu_directive_ec_list |
bool | None
|
Indicates if the substance is on the EU directive EC list. |
eu_explosive_precursors_annex_1_list |
bool | None
|
Indicates if the substance is on the EU explosive precursors Annex 1 list. |
eu_explosive_precursors_annex_2_list |
bool | None
|
Indicates if the substance is on the EU explosive precursors Annex 2 list. |
eu_ozone_depletion_list |
bool | None
|
Indicates if the substance is on the EU ozone depletion list. |
eu_pollutant_annex_2_list |
bool | None
|
Indicates if the substance is on the EU pollutant Annex 2 list. |
eu_pop_list |
bool | None
|
Indicates if the substance is on the EU POP list. |
export_control_list_phrases |
bool | None
|
Indicates if the substance is on the export control list. |
green_gas_list |
bool | None
|
Indicates if the substance is on the green gas list. |
iecsc_notified |
bool | None
|
Indicates if the substance is IECSc notified. |
index_no |
str | None
|
Index number for the substance. |
jpencs_notified |
bool | None
|
Indicates if the substance is JPENCS notified. |
jpishl_notified |
bool | None
|
Indicates if the substance is JPISHL notified. |
koecl_notified |
bool | None
|
Indicates if the substance is KOECL notified. |
kyoto_protocol |
bool | None
|
Indicates compliance with the Kyoto Protocol. |
massachusetts_rtk |
bool | None
|
Indicates if the substance is on the Massachusetts RTK list. |
montreal_protocol |
bool | None
|
Indicates compliance with the Montreal Protocol. |
new_jersey_rtk |
bool | None
|
Indicates if the substance is on the New Jersey RTK list. |
new_york_rtk |
bool | None
|
Indicates if the substance is on the New York RTK list. |
nzioc_notified |
bool | None
|
Indicates if the substance is NZIOC notified. |
pcr_regulated |
bool | None
|
Indicates if the substance is PCR regulated. |
pennsylvania_rtk |
bool | None
|
Indicates if the substance is on the Pennsylvania RTK list. |
peroxide_function_groups |
int | None
|
Number of peroxide function groups. |
piccs_notified |
bool | None
|
Indicates if the substance is PICCS notified. |
rhode_island_rtk |
bool | None
|
Indicates if the substance is on the Rhode Island RTK list. |
rotterdam_conv_list |
bool | None
|
Indicates if the substance is on the Rotterdam Convention list. |
sdwa |
bool | None
|
Indicates compliance with the SDWA. |
source |
str | None
|
Source of the substance information. |
specific_concentration_limit |
str | None
|
Specific concentration limit for the substance. |
stockholm_conv_list |
bool | None
|
Indicates if the substance is on the Stockholm Convention list. |
stot_affected_organs |
str | None
|
Organs affected by STOT. |
stot_route_of_exposure |
str | None
|
Route of exposure for STOT. |
tcsi_notified |
bool | None
|
Indicates if the substance is TCSI notified. |
trade_secret |
str | None
|
Information about trade secrets. |
tw_ghs_clas_list |
bool | None
|
Indicates if the substance is on the TW GHS classification list. |
tw_handle_priority_chem |
bool | None
|
Indicates if the substance is a priority chemical. |
tw_handle_toxic_chem |
bool | None
|
Indicates if the substance is a toxic chemical. |
tw_ind_waste_standards |
bool | None
|
Indicates compliance with TW industrial waste standards. |
vinic_notified |
bool | None
|
Indicates if the substance is VINIC notified. |
exposure_controls_osha |
list[ExposureControl] | None
|
OSHA exposure controls. |
exposure_controls_aiha |
list[ExposureControl] | None
|
AIHA exposure controls. |
exposure_controls_niosh |
list[ExposureControl] | None
|
NIOSH exposure controls. |
snur |
bool | dict | None
|
Significant new use rule information. |
tsca_12b_concentration_limit |
float | None
|
TSCA 12(b) concentration limit. |
cercla_rq |
float | None
|
CERCLA reportable quantity. |
california_prop_65 |
list[str] | None
|
Information related to California Prop 65. |
sara_302 |
bool | None
|
Indicates compliance with SARA 302. |
sara_313_concentration_limit |
float | None
|
SARA 313 concentration limit. |
cfr_marine_pollutant |
dict | None
|
Information about marine pollutants under CFR. |
cfr_reportable_quantity |
dict | None
|
Information about reportable quantities under CFR. |
rohs_concentration |
float | None
|
ROHS concentration limit. |
skin_corrosion_info |
list[SkinCorrosionInfo] | None
|
Information about skin corrosion. |
serious_eye_damage_info |
list[SeriousEyeDamageInfo] | None
|
Information about serious eye damage. |
respiratory_skin_sens_info |
list[RespiratorySkinSensInfo] | None
|
Information about respiratory skin sensitization. |
is_known |
bool
|
Indicates if the substance is known (i.e. has known regulatory or hazard information in the database) (note this is an alias for the isCas field which behaves in a non intuitive way in the API so we have opted to use is_known for usability instead) |
acute_dermal_tox_info
acute_dermal_tox_info: list[ToxicityInfo] | None = Field(
None, alias="acuteDermalToxInfo"
)
acute_inhalation_tox_info
acute_inhalation_tox_info: list[ToxicityInfo] | None = (
Field(None, alias="acuteInhalationToxInfo")
)
acute_oral_tox_info
acute_oral_tox_info: list[ToxicityInfo] | None = Field(
None, alias="acuteOralToxInfo"
)
bio_accumulative_info
bio_accumulative_info: list[BioAccumulativeInfo] | None = (
Field(None, alias="bioAccumulativeInfo")
)
boilingpoint_info
boilingpoint_info: list[BoilingPointInfo] | None = Field(
None, alias="boilingpointInfo"
)
classification_type
classification_type: str | None = Field(
default=None, alias="classificationType"
)
degradability_info
degradability_info: list[DegradabilityInfo] | None = Field(
None, alias="degradabilityInfo"
)
exposure_controls_acgih
exposure_controls_acgih: list[ExposureControl] | None = (
Field(None, alias="exposureControlsACGIH")
)
approved_legal_entities
approved_legal_entities: Any | None = Field(
None, alias="approvedLegalEntities"
)
aspiration_tox_info
canada_inventory_status
canada_inventory_status: str | None = Field(
None, alias="canadaInventoryStatus"
)
dermal_acute_toxicity
dermal_acute_toxicity: float | None = Field(
None, alias="dermalAcuteToxicity"
)
inhalation_acute_toxicity
inhalation_acute_toxicity: float | None = Field(
None, alias="inhalationAcuteToxicity"
)
lethal_dose_and_concentrations
lethal_dose_and_concentrations: (
list[LethalDoseConcentration] | None
) = Field(None, alias="lethalDoseAndConcentrations")
molecular_weight
molecular_weight: list[MolecularWeight] | None = Field(
None, alias="molecularWeight"
)
specific_conc_eu
specific_conc_eu: list[SpecificConcentration] | None = (
Field(None, alias="specificConcEU")
)
sustainability_status_lbc
sustainability_status_lbc: str | None = Field(
None, alias="sustainabilityStatusLBC"
)
eu_annex_14_substances_list
eu_annex_14_substances_list: bool | None = Field(
None, alias="euAnnex14SubstancesList"
)
eu_annex_17_restrictions_list
eu_annex_17_restrictions_list: bool | None = Field(
None, alias="euAnnex17RestrictionsList"
)
eu_annex_17_substances_list
eu_annex_17_substances_list: bool | None = Field(
None, alias="euAnnex17SubstancesList"
)
eu_dang_chem_annex_1_part_1_list
eu_dang_chem_annex_1_part_1_list: bool | None = Field(
None, alias="euDangChemAnnex1Part1List"
)
eu_dang_chem_annex_1_part_2_list
eu_dang_chem_annex_1_part_2_list: bool | None = Field(
None, alias="euDangChemAnnex1Part2List"
)
eu_dang_chem_annex_1_part_3_list
eu_dang_chem_annex_1_part_3_list: bool | None = Field(
None, alias="euDangChemAnnex1Part3List"
)
eu_dang_chem_annex_5_list
eu_dang_chem_annex_5_list: bool | None = Field(
None, alias="euDangChemAnnex5List"
)
eu_explosive_precursors_annex_1_list
eu_explosive_precursors_annex_1_list: bool | None = Field(
None, alias="euExplosivePrecursorsAnnex1List"
)
eu_explosive_precursors_annex_2_list
eu_explosive_precursors_annex_2_list: bool | None = Field(
None, alias="euExplosivePrecursorsAnnex2List"
)
eu_ozone_depletion_list
eu_ozone_depletion_list: bool | None = Field(
None, alias="euOzoneDepletionList"
)
eu_pollutant_annex_2_list
eu_pollutant_annex_2_list: bool | None = Field(
None, alias="euPollutantAnnex2List"
)
export_control_list_phrases
export_control_list_phrases: bool | None = Field(
None, alias="exportControlListPhrases"
)
peroxide_function_groups
peroxide_function_groups: int | None = Field(
None, alias="peroxideFunctionGroups"
)
specific_concentration_limit
specific_concentration_limit: str | None = Field(
None, alias="specificConcentrationLimit"
)
stot_route_of_exposure
stot_route_of_exposure: str | None = Field(
None, alias="stotRouteOfExposure"
)
tw_handle_priority_chem
tw_handle_priority_chem: bool | None = Field(
None, alias="twHandlePriorityChem"
)
tw_ind_waste_standards
tw_ind_waste_standards: bool | None = Field(
None, alias="twIndWasteStandards"
)
exposure_controls_osha
exposure_controls_osha: list[ExposureControl] | None = (
Field(None, alias="exposureControlsOSHA")
)
exposure_controls_aiha
exposure_controls_aiha: list[ExposureControl] | None = (
Field(None, alias="exposureControlsAIHA")
)
exposure_controls_niosh
exposure_controls_niosh: list[ExposureControl] | None = (
Field(None, alias="exposureControlsNIOSH")
)
tsca_12b_concentration_limit
tsca_12b_concentration_limit: float | None = Field(
None, alias="tsca12BConcentrationLimit"
)
sara_313_concentration_limit
sara_313_concentration_limit: float | None = Field(
None, alias="sara313ConcentrationLimit"
)
cfr_reportable_quantity
cfr_reportable_quantity: dict | None = Field(
None, alias="CFRreportableQuantity"
)
skin_corrosion_info
skin_corrosion_info: list[SkinCorrosionInfo] | None = Field(
None, alias="skinCorrosionInfo"
)
serious_eye_damage_info
serious_eye_damage_info: (
list[SeriousEyeDamageInfo] | None
) = Field(None, alias="seriousEyeDamageInfo")
respiratory_skin_sens_info
respiratory_skin_sens_info: (
list[RespiratorySkinSensInfo] | None
) = Field(None, alias="respiratorySkinSensInfo")
SubstanceResponse
Bases: BaseAlbertModel
SubstanceResponse is a Pydantic model representing the response containing substance information.
Attributes:
| Name | Type | Description |
|---|---|---|
substances |
list[Substance]
|
A list of substances. |
substance_errors |
list[Any] | None
|
A list of errors related to substances, if any. |
AlbertSession
AlbertSession(
*,
base_url: str,
token: str | None = None,
client_credentials: ClientCredentials | None = None,
retries: int | None = None,
)
Bases: Session
A session that has a base URL, which is prefixed to all request URLs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_url
|
str
|
The base URL to prefix to all requests. (e.g., "https://sandbox.albertinvent.com") |
required |
retries
|
int
|
The number of retries for failed requests. Defaults to 3. |
None
|
client_credentials
|
ClientCredentials | None
|
The client credentials for programmatic authentication. Optional if token is provided. |
None
|
token
|
str | None
|
The JWT token for authentication. Optional if client credentials are provided. |
None
|
Source code in src/albert/session.py
request
Source code in src/albert/session.py
SubstanceCollection
SubstanceCollection(*, session: AlbertSession)
Bases: BaseCollection
SubstanceCollection is a collection class for managing Substance entities in the Albert platform.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
AlbertSession
|
An instance of the Albert session used for API interactions. |
required |
Attributes:
| Name | Type | Description |
|---|---|---|
base_path |
str
|
The base URL for making API requests related to substances. |
Methods:
| Name | Description |
|---|---|
get_by_ids |
Retrieves a list of substances by their CAS IDs and optional region. |
get_by_id |
Retrieves a single substance by its CAS ID and optional region. |
Source code in src/albert/collections/substance.py
get_by_ids
get_by_ids(
*,
cas_ids: list[str],
region: str = "US",
catch_errors: bool | None = None,
) -> list[SubstanceInfo]
Get substances by their CAS IDs.
If catch_errors is set to False, the number of substances returned
may be less than the number of CAS IDs provided if any of the CAS IDs result in an error.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cas_ids
|
list[str]
|
A list of CAS IDs to retrieve substances for. |
required |
region
|
str
|
The region to filter the subastance by, by default "US" |
'US'
|
catch_errors
|
bool
|
Whether to catch errors for unknown CAS, by default True. |
None
|
Returns:
| Type | Description |
|---|---|
list[SubstanceInfo]
|
A list of substances with the given CAS IDs. |
Source code in src/albert/collections/substance.py
get_by_id
get_by_id(
*,
cas_id: str,
region: str = "US",
catch_errors: bool | None = None,
) -> SubstanceInfo
Get a substance by its CAS ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cas_id
|
str
|
The CAS ID of the substance to retrieve. |
required |
region
|
str
|
The region to filter the substance by, by default "US". |
'US'
|
catch_errors
|
bool
|
Whether to catch errors for unknown CAS, by default False. |
None
|
Returns:
| Type | Description |
|---|---|
SubstanceInfo
|
The retrieved substance or raises an error if not found. |