Quoting
- 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().Quote initialisation
- 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: float | None, currency: str | None)[source]
Class to represent a certain amount of currency. Supported currencies:
CURRENCIES = { 'USD':'$', 'EUR':'€', 'GBP':'£', }
Price initialisation
- 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