PyPI version

CDES Python SDK

Type-safe Python library for working with cannabis strains, terpenes, cannabinoids, and COA data. Now with standard colors and therapeutic data.

pip install cdes

What's New in v1.3.0

Major release with standard colors, therapeutic data, and reference data access.

Standard Colors

Consistent hex colors for all 30 terpenes and 9 cannabinoids for visualizations.

get_terpene_color("myrcene")

Therapeutic Data

Medical conditions with ICD-10 codes, PubMed citations, and evidence levels.

TerpeneRef.get_therapeutics()

Reference Data

Direct access to CDES master data with automatic updates.

from cdes.reference import ColorRef

Core Features

Strains

Validated strain data with genetics, lineage, and terpene profiles.

Strain, StrainGenetics

Terpenes

30 terpenes with CAS numbers, colors, and therapeutic data.

Terpene, TerpeneProfile

Cannabinoids

9 cannabinoids with FDA status, scheduling, and effects.

Cannabinoid, CannabinoidProfile

COA Data

Certificate of Analysis parsing with potency and safety results.

COAResult, PotencyResult

Standard Colors

Hex colors for consistent data visualization across apps.

ColorRef, get_terpene_color()

Validation

Pydantic models with automatic type validation and serialization.

model_validate(), model_dump()

Standard Color System

Consistent colors for terpenes and cannabinoids across all CDES-compliant applications.

Terpene Colors (Sample)

#E8F5E9 Myrcene
#FFF3E0 Limonene
#E3F2FD Linalool
#E8EAF6 Caryophyllene
#F1F8E9 Pinene
View all 30 terpene colors

Cannabinoid Colors (Sample)

#C8E6C9 THC
#B3E5FC CBD
#FFECB3 CBG
#D1C4E9 CBN
#F8BBD9 CBC
View all 9 cannabinoid colors

Quick Examples

# Import the SDK
from cdes import Strain, Terpene, TerpeneProfile
from cdes.reference import ColorRef

# Get standard colors for visualization
myrcene_color = ColorRef.get_terpene_color("myrcene")
# Returns: "#E8F5E9"

thc_color = ColorRef.get_cannabinoid_color("THC")
# Returns: "#C8E6C9"

# Create a terpene profile
profile = TerpeneProfile(
    dominant=Terpene(name="Myrcene", percentage=0.45),
    secondary=[
        Terpene(name="Limonene", percentage=0.23),
        Terpene(name="Caryophyllene", percentage=0.18),
    ]
)

# Access therapeutic data
from cdes.reference import TerpeneRef

therapeutics = TerpeneRef.get_therapeutics("myrcene")
# Returns conditions, symptoms, evidence levels, PubMed citations

Built For

Dispensaries

Menu systems, POS integration, inventory

Labs

COA generation, LIMS integration

Analytics

Dashboards, visualizations, reporting

Healthcare

EHR integration via CDES-M

Start Building Today

Install the SDK and start working with standardized cannabis data in minutes.