🧪 streamlit-chem
Native, RDKit-powered chemistry for Streamlit. Render, edit, and analyze molecules with first-class
st.*commands — no iframes, no custom components, and no pickling foot-guns.
It leverages RDKit as its cheminformatics engine. Structures are rendered server-side to sanitized SVG, so molecules travel straight from Python to the browser — there is no browser-side RDKit to ship.
Installation
pip install streamlit-chem
streamlit-chem is import-compatible with Streamlit: install it and every chemical command below is available on the st.* namespace alongside the full Streamlit API.
Getting started
import streamlit as st
st.molecule(
"CC(=O)Oc1ccccc1C(=O)O",
caption="Aspirin",
highlight_substructure="c1ccccc1",
)
Pass a SMILES string or an rdkit.Chem.Mol — both just work.
Chemical elements
| Command | Description |
|---|---|
st.molecule |
Render a molecule as a native 2D structure, with optional substructure highlighting. |
st.chem_dataframe |
A chemistry-aware st.dataframe: a molecule column renders as 2D structures, everything else behaves like a normal dataframe. |
st.smarts_input |
A st.text_input that validates a SMARTS/SMILES substructure query with RDKit as you type. |
st.mol_card |
A compact summary card: structure + physicochemical metrics + a Lipinski rule-of-five badge. |
st.chem_draw |
An interactive 2D editor (Ketcher) that returns the drawn structure as an rdkit.Chem.Mol. |
st.mol_viewer |
An interactive 3D viewer (3Dmol.js) from a server-side RDKit conformer, returning atom/bond clicks. |
st.chem_space |
Project a molecule library to a 2D map (fingerprints → PCA/t-SNE/UMAP) and lasso-select points. |
st.r_group_decomposition |
Decompose a series around a shared core into a table of rendered core and R-group structures. |
Molecules are also safe to cache — @st.cache_data serializes rdkit.Chem.Mol objects transparently.
Demo
A gallery showcasing every element lives in demo_molecule.py:
streamlit run demo_molecule.py
Metadata
Release files for streamlit-chem 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| streamlit_chem-0.1.0.tar.gz | 10.1 MB | With provenance | Details for streamlit_chem-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| streamlit_chem-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for streamlit_chem-0.1.0-py3-none-any.whl |
Total release size: 20.9 MB
Release files / streamlit_chem-0.1.0.tar.gz
| Download URL | streamlit_chem-0.1.0.tar.gz |
|---|---|
| Size | 10.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ca922a45c95b06191bcdb79fbaff6a6b641437b6592e42db2d34a93c09ee6f6
|
|
BLAKE2b-256 checksum How to use checksums |
04f3d7d2c2a6fbb6ee555602c7323f76d26dd3bb5c9bd16169a5c1959425aa2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / streamlit_chem-0.1.0-py3-none-any.whl
| Download URL | streamlit_chem-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
82f0ad217f97358bee7303ecbc534c4f48bffffb96fe52d4b644354c9231c542
|
|
BLAKE2b-256 checksum How to use checksums |
5c521af2ec91e420d55bee857c6d47c302498cd6b25bba41425d6676c13f0f0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logSecurity for streamlit-chem 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for streamlit_chem-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.