Carbon Property Tables Python SDK
The SDK requests citation-backed comparison figures rendered by the Carbon Property Tables service. It is a figure and benchmarking interface, not a bulk database-download client or a local copy of the canonical dataset.
Install
python -m pip install carbon-property-tables==0.3.4
Make a figure
import carbon_property_tables as cpt
figure = cpt.scatter(
"specific strength",
"specific conductivity",
log_x=True,
log_y=True,
)
figure.save_bundle("conductivity-strength")
figure
save_bundle() writes editable SVG, publication-resolution PNG, Nature-style citation text, BibTeX, and a value-free reproducibility manifest tied to the exact database release. SVG and PNG are requested together by default. Request PDF explicitly with formats=("svg", "png", "pdf") when needed.
The first property is the x-axis and the second is the y-axis. Readable names are accepted, including "specific cond", "tenacity", "tensile strength", and "thermal conductivity". Misspelled or unknown properties fail explicitly instead of being guessed.
The other figure modes use the same interface:
ranked = cpt.ranked("density", "tensile strength", top=10)
trend = cpt.trend("density", "tensile strength")
ashby = cpt.ashby("density", "specific strength")
Run the complete acceptance test
cpt-feature-tour --output-dir cpt-feature-tour-output
The command tests the production release and property endpoints, scatter/ranked/trend/Ashby figures, material filters, a temporary ranked point, the bounded top table, SVG/PNG/PDF exports, citation and BibTeX sidecars, and validation boundaries. It writes inspectable artifacts plus feature-tour-report.json to the selected directory and exits nonzero on any failure.
The equivalent module command is:
python -m carbon_property_tables.feature_tour --output-dir cpt-feature-tour-output
Install locally
python -m pip install -e ./python
The default client uses the live service at https://carbonnanotubes.onrender.com/api/v1. Set CPT_API_URL or pass a URL to CPTClient to target a local or alternate deployment.
Benchmark a temporary result
import carbon_property_tables as cpt
from carbon_property_tables import TemporaryPoint
comparison = cpt.scatter(
"specific_strength",
"specific_electrical_conductivity",
log_x=True,
log_y=True,
peer_reviewed=True,
material_family=["CNT_or_CNT_hybrid", "CNT_metal_composite"],
top=5,
top_by="y",
formats=("svg", "png", "pdf"),
temporary=TemporaryPoint(
x=1.8,
y=12.0,
label="My CNT fiber",
),
)
comparison.save("conductivity-strength.svg")
print(comparison.temporary_point)
Temporary coordinates use the display units printed on the active axes. They are rendered and ranked against the visible representative material set, but are never written to Carbon Property Tables.
In Jupyter, returning figure from a cell displays its SVG directly. save() writes one requested format with matching citation sidecars. save_bundle() writes all requested formats once, plus .citations.txt, .bib, and .manifest.json sidecars.
Check DOI coverage without extracting values
import carbon_property_tables as cpt
if cpt.has_doi("10.1126/science.adj1082"):
print("Represented in Carbon Property Tables")
status = cpt.doi_status("https://doi.org/10.1126/science.adj1082")
print(status.title, status.journal, status.year)
The DOI lookup is exact and rate-limited. It returns only presence and bibliographic identity; it does not return record IDs, available properties, measurements, coordinates, or sample counts.
Extract a bounded top table
Exact values can be requested only for the selected top subset, with a hard maximum of ten rows:
for row in comparison.top_table():
print(row["rank"], row["label"], row["y_value"], row["y_unit"], row["doi"])
comparison.save_top_table("top-five.csv")
top_by="x" or top_by="y" must name a higher-is-better performance axis. Density and dimensions are filter or normalization variables, not optimization targets.
Figure modes
scattercompares any two same-record properties.rankedranks the y property among records that also contain the selected x property.trendplots the selected y property against publication year.ashbyenforces logarithmic axes and shows robust material-family regions where enough data exist.
All bounded figure filters supported by the service can be passed as keyword arguments. For example:
figure = cpt.scatter(
"density",
"tensile_strength",
measurement_filter=["diameter::0.000020"],
gauge_length_min_mm=10,
year_min=2015,
)
Measurement-range filters use canonical SI units. Axis values and temporary-point inputs use the display units printed on the figure.
Deliberate access boundary
The public SDK does not expose canonical-record pagination, arbitrary record retrieval, full plot-coordinate tables, or a local plotting engine. Exact tabular output is limited to the explicitly requested top subset and capped at ten rows. A rendered vector figure can still be digitized, so this is an access and citation boundary rather than digital-rights management. Publication use requires the automatically supplied original-source and Carbon Property Tables citations.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file carbon_property_tables-0.3.4.tar.gz.
File metadata
- Download URL: carbon_property_tables-0.3.4.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bf9073fed253b53f282c037bf61f0cd668b5a4abd1028161c278a39dae1a5d2
|
|
| MD5 |
cd729b8f42b026a63ec9d7161fc5d73b
|
|
| BLAKE2b-256 |
b37996961d1e973f939320dfe856406c6b033adad4ac7d45075f77a04e8264e0
|
Provenance
The following attestation bundles were made for carbon_property_tables-0.3.4.tar.gz:
Publisher:
python-sdk.yml on gs-stanford/CarbonNanotubes
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
carbon_property_tables-0.3.4.tar.gz -
Subject digest:
9bf9073fed253b53f282c037bf61f0cd668b5a4abd1028161c278a39dae1a5d2 - Sigstore transparency entry: 2554754537
- Sigstore integration time:
-
Permalink:
gs-stanford/CarbonNanotubes@99c37904c6c5e1597e42d8b2fd0c31db7345a4fb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gs-stanford
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-sdk.yml@99c37904c6c5e1597e42d8b2fd0c31db7345a4fb -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file carbon_property_tables-0.3.4-py3-none-any.whl.
File metadata
- Download URL: carbon_property_tables-0.3.4-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2e7bb62e8debcaf02b6b343c5ed353e03633cd3d45fc7c7bfd15f952fd2d5ea
|
|
| MD5 |
e20bb50c8667660d7994d5305562d6d4
|
|
| BLAKE2b-256 |
76c096808bdbbecb617ab6d3fa705fff832eacb94d38806917a4972681f392db
|
Provenance
The following attestation bundles were made for carbon_property_tables-0.3.4-py3-none-any.whl:
Publisher:
python-sdk.yml on gs-stanford/CarbonNanotubes
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
carbon_property_tables-0.3.4-py3-none-any.whl -
Subject digest:
a2e7bb62e8debcaf02b6b343c5ed353e03633cd3d45fc7c7bfd15f952fd2d5ea - Sigstore transparency entry: 2554754561
- Sigstore integration time:
-
Permalink:
gs-stanford/CarbonNanotubes@99c37904c6c5e1597e42d8b2fd0c31db7345a4fb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gs-stanford
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-sdk.yml@99c37904c6c5e1597e42d8b2fd0c31db7345a4fb -
Trigger Event:
workflow_dispatch
-
Statement type: