CDES SDKs & Libraries

Official SDK packages for Python, .NET, and TypeScript — enabling cannabis data standardization, medical integration, and regulatory compliance across platforms.

TS

TypeScript SDK

Coming to npm

@cdes-world/sdk-typescript

Full TypeScript/JavaScript SDK with type definitions, including standard colors for terpenes and cannabinoids.

  • Complete type definitions
  • Standard color palette included
  • React/Node.js compatible
// Import the SDK
import { Strain, Terpene, ColorRef } from '@cdes-world/sdk-typescript';

// Get standard colors for visualization
const myrceneColor = ColorRef.getTerpeneColor("myrcene");
// Returns: "#E8F5E9"

const thcColor = ColorRef.getCannabinoidColor("THC");
// Returns: "#E63946"
C#

.NET SDK

v1.0.0

Cdes

Full C# SDK with strongly-typed models, reference data lookups, terpene profile analysis, and System.Text.Json serialization. 148 unit tests. MIT License.

  • Strongly-typed models & enums
  • Reference data for 39 terpenes & 17 cannabinoids
  • System.Text.Json serialization
  • .NET 8 / Blazor / Azure Functions ready
// Install: dotnet add package Cdes
using Cdes.Models;
using Cdes.ReferenceData;
using Cdes.Analysis;

// Look up terpene reference data
var myrcene = TerpeneReference.GetByName("Myrcene");
Console.WriteLine(myrcene?.BoilingPoint); // 168°C

// Analyze a terpene profile
var profile = new TerpeneProfile(entries);
var analysis = ProfileAnalyzer.Analyze(profile);
Console.WriteLine(analysis.DominantTerpene);
Py

Python SDKs

Quick Install - All Core Packages

pip
pip install cdes cdes-m cdes-gdpr

cdes

cdes version

Core cannabis data models. Strains, terpenes, cannabinoids, and COA validation.

pip install cdes

cdes-m

cdes-m version

Medical cannabis data exchange. FHIR R4, HL7, ICD-10, and healthcare interoperability.

pip install cdes-m

cdes-gdpr

cdes-gdpr version

GDPR compliance for cannabis data. Consent management, data subject rights, and audit logging.

pip install cdes-gdpr

cdes-mk

cdes-mk version

Marketing extensions. Product marketing copy, strain descriptions, and promotional content generation.

pip install cdes-mk

cdes-fs

cdes-fs version

Food safety compliance. Certificate of Analysis (COA) and contaminant testing.

pip install cdes-fs

cdes-c

cdes-c version

Commerce/e-commerce integration. Shopping cart, inventory sync, and point-of-sale data exchange.

pip install cdes-c

Use Cases

Healthcare Integration

from cdes_m import Patient, Recommendation
from cdes_gdpr import ConsentManager

# HIPAA/GDPR compliant patient data
patient = Patient(mrn="12345")
consent = ConsentManager()
consent.record_consent(patient.id, "treatment")

Use cdes-m + cdes-gdpr for medical cannabis clinics.

Dispensary Software

from cdes import Strain, TerpeneProfile
from cdes_mk import MetrcPackage

# Validate strain data and sync to METRC
strain = Strain(name="Blue Dream", type="hybrid")
package = MetrcPackage.from_strain(strain)

Use cdes + cdes-mk for seed-to-sale tracking.

Requirements

Python

  • Python 3.9 or higher
  • Available on PyPI

.NET

  • .NET 8.0 or higher
  • Available on NuGet

TypeScript

  • TypeScript 5.0 or higher
  • Node.js 18+ / Browser

All SDKs are open source under the Apache 2.0 / MIT License.