Quoting
Attention
It is now generally recommended to obtain a snapshot of the entire Enamine catalogue using one of the following links and not relying on the Pycule implementation in this module:
Global catalogue delivery from Kyiv, Ukraine, in 7-10 business days
EU stock delivery from Riga, Latvia, in 1-2 business days
- class hippo.pycule.Quoter(supplier: str, username: str = None, password: str = None, token: str = None)[source]
Class to scrape catalogue data
Currently ‘Enamine’ and ‘MCule’ are supported. Once initialised
- get_enamine_batch_quote(compounds, currency='USD', catalogues=None, exact=False, forms=False, analogues=False, equivalents=False)[source]
- Parameters:
compounds –
currency – (Default value = “USD”)
catalogues – (Default value = None)
exact – (Default value = False)
forms – (Default value = False)
analogues – (Default value = False)
equivalents – (Default value = False)
- get_enamine_quote(compound, currency='USD')[source]
- Parameters:
compound –
currency – (Default value = “USD”)
- get_mcule_quote(compound, exact=False)[source]
- Parameters:
compound –
exact – (Default value = False)
- parse_enamine_pack(compound, entry, purity, catalogue, pack, lead_time, smiles)[source]
- Parameters:
compound –
entry –
purity –
catalogue –
pack –
lead_time –
smiles –
- parse_enamine_response(result, compound, catalogue)[source]
- Parameters:
result –
compound –
catalogue –
- class hippo.quote.Quote(db: Database, id: int, compound: int, smiles: str, supplier: str, catalogue: str, entry: str, amount: float, price: float, currency: str, purity: float, lead_time: int, date: str | None = None, type: str | None = None)[source]
Supplier quote for a specific quantity of a
Compound.Attention
Quoteobjects should not be created directly. Instead useCompound.get_quotes().- property amount: float
Amount in mg
- property catalogue: str | None
Name of the catalogue
- classmethod combination(required_amount: float, quotes: list[Quote]) Quote[source]
Combine a list of quotes into one
Quoteobject.Start with biggest pack
Estimate by scaling linearly with unit price
- Parameters:
required_amount – amount in mg
quotes – list of quotes to be combined
- property date: str
Date the quote was registered to the database
- property dict: dict
Dictionary representation of this quote
- property entry: str
Name/ID of the catalogue entry
- property entry_str: str
Unformatted string including the supplier, catalogue (if available), and entry name of the quote
- property id: int
Returns the quote’s database ID
- property lead_time: float
Lead time in days
- property purity: float
Purity fraction
- property smiles: str
Returns the catalogue SMILES string
- property supplier: str
Name of the supplier
- property type: str
Description of this quote
- class hippo.price.Price(amount, currency)[source]
Class to represent a certain amount of currency. Supported currencies:
CURRENCIES = { 'USD':'$', 'EUR':'€', 'GBP':'£', }
- property amount: float
Amount
- property currency: str
Currency string
- classmethod from_dict(d: dict) Price[source]
Create a
Priceobject from a dictionary:dict(amount: float, currency: str)
- Parameters:
d – dictionary in the above format:
- property is_null: bool
Is this
Price.null()or zero?
- property symbol: str
Currency symbol