Skip to main content


ChemPrice

ChemPrice is a software tool designed for the purpose of gathering pricing information for specific molecules. It is capable of retrieving price data from three different integration sources: Molport, ChemSpace, and MCule. To access these integrators, users must provide an API key for each one.

Resources

User Manual

You can find the detailed features and examples in the following link: User Manual.

Web Application

ChemPrice is also available as a web application. You can use it at the following link: Web Application.

Installation

Use pip

ChemPrice can be installed using pip by running:

pip install chemprice

How to use Chemprice

Getting started

ChemPrice requires a list of molecule SMILES as the representation of molecules:

smiles_list = ["CC(=O)NC1=CC=C(C=C1)O", "CC(C)CC1=CC=C(C=C1)C(C)C(=O)O", "O=C(C)Oc1ccccc1C(=O)O"]

First, we need to create an instance from the PriceCollector class. Using this instance, we'll be able to connect to the various integrators and then launch a search on the list of smiles entered.

from chemiprice import PriceCollector
pc = PriceCollector()

Request an API key

To access integrators' data, you need to be able to connect to their API.

If you don't have an API key yet, you can click on the following links : Molport, ChemSpace and MCule, which will take you back to their sites where you can request an API key.

Set the API key for each integrator

Now, an instance from the PriceCollector class has been created, we need to connect to one or more integrators via an API key.

Connection to Molport via API key:

pc.setMolportApiKey("880d8343-8ui2-418c-9g7a-68b4e2e78c8b")

In the case of Molport, it's also possible to log in with a login and password.

pc.setMolportUsername("john.spade")
pc.setMolportPassword("fasdga34a3")

To check the status of each key, run the following method :

pc.status()

Possible Outputs

# Username/Password and API Key are Set:
Status: Molport: both credentials are set.

# Only Username/Password or API Key is Set:
Status: Molport: credential is set.

# No Credential is Set:
Status: Molport: no credential is set.

Similar to the Molport connection, for ChemSpace and MCule, the approach is the same. However, ChemSpace and MCule require only an API key. You need to use the :mod:setChemSpaceApiKey() and :mod:setMCuleApiKey() functions, such as :

pc.setChemSpaceApiKey(<chemspace_api_key>)
pc.setMCuleApiKey(<mcule_api_key>)

Price Search

Before starting the price search, check the validity of the API keys entered.

pc.check()

Possible Outputs:

# API Key is Set and correct:
Check: Molport API key is correct.

# API Key is Set but not correct:
Check: Molport API key is incorrect.

If the identifiers checked are correct, then it's possible to run the method :mod:collect() to obtain all the information found on the molecule. The price is given in USD according to the units and quantity entered by the vendor. The units of measurement for quantities are categorized into three families: mols, grams, and liters.

all_prices = pc.collect()

The output will be a dataframe containing all price information about the molecule.

Input Smiles Source Supplier Name Purity Amount Measure Price_USD
CC(=O)NC1=CC=C(C=C1)O Molport "ChemDiv, Inc." >90 100 mg 407.1
CC(=O)NC1=CC=C(C=C1)O Molport MedChemExpress Europe 98.83 10 g 112.8
CC(=O)NC1=CC=C(C=C1)O Molport TargetMol Chemicals 100.0 500 mg 50.0

With the :mod:selectBest() function, you can keep only the best prices for each molecule. In fact, for each unit of measurement (mol gram and liter) the results are compared to find the best quantity/price ratio.

pc.selectBest(all_prices)

The output will be a dataframe containing only the best quantity/price ratio of each molecule.

Input Smiles Source Supplier Name Purity Amount Measure Price_USD USD/g USD/mol
CC(=O)NC1=CC=C(C=C1)O Molport Cayman Europe >=98 500 g 407.1 0.22
O=C(C)Oc1ccccc1C(=O)O Molport Cayman Europe >=90 500 g 112.8 0.1606
O=C(C)Oc1ccccc1C(=O)O Molport Life Chemicals Inc. >90 20 micromol 50.0 3950000.0000000005

Contact

For any question you can contact us through email:

Metadata

Release files for chemprice 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chemprice 1.1.0
File Size Uploaded
chemprice-1.1.0.tar.gz 74.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chemprice 1.1.0
File Interpreter ABI Platform
chemprice-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 152.5 kB

Release files / chemprice-1.1.0.tar.gz

Download URL chemprice-1.1.0.tar.gz
Size 74.1 kB
Tags Source
SHA-256 checksum
How to use checksums
054312d8d29439d4641d4a9310c7940e6e88a75d9e6030dc0a9cc138bcd0009d
BLAKE2b-256 checksum
How to use checksums
7fd32fd4e9c6a532abb026726086c957c0bd09e1ce5c9ac4cfefc215434d7359
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.28.1 rfc3986/1.5.0 tqdm/4.65.0 urllib3/1.26.5 CPython/3.10.12

Release files / chemprice-1.1.0-py3-none-any.whl

Download URL chemprice-1.1.0-py3-none-any.whl
Size 78.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79b5f187e8f2f3e7bffdff8161770deb643f84017e2e15d8cb0c58f962643151
BLAKE2b-256 checksum
How to use checksums
497e4b9ccfe5c35e6a0f9ee79616b617b091e8b93b2936a6b1144a0c6ed5ff66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.28.1 rfc3986/1.5.0 tqdm/4.65.0 urllib3/1.26.5 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page