Skip to content

demo

Demo dataset models for the API.

These models describe demo datasets available for quick platform exploration.

AdminDemoDatasetCreate pydantic-model

Bases: BaseModel

Request body for POST /admin/demo-datasets.

Fields:

  • name (str)
  • full_name (str)
  • description (str)
  • version (str)
  • source_name (str)
  • source_url (HttpUrl)
  • licence_name (str)
  • licence_url (HttpUrl)
  • studies (list[DemoStudyCreate])

AdminDemoDatasetOut pydantic-model

Bases: BaseModel

Admin-facing response for a demo dataset.

Fields:

  • id (UUID)
  • name (str)
  • full_name (str)
  • description (str)
  • version (str)
  • source_name (str)
  • source_url (HttpUrl)
  • licence_name (str)
  • licence_url (HttpUrl)
  • study_count (int)
  • recording_count (int)
  • created_at (datetime)
  • updated_at (datetime)

DemoDatasetDescription pydantic-model

Bases: BaseModel

Description of a demo dataset (user-facing list endpoint).

Fields:

  • name (str)
  • full_name (str)
  • description (str)
  • version (str)
  • source_name (str)
  • source_url (HttpUrl)
  • licence_name (str)
  • licence_url (HttpUrl)
  • recording_count (int)

DemoDatasetRegisterRequest pydantic-model

Bases: BaseModel

Request body for POST /projects/public/demo.

Fields:

  • dataset (str)
  • project_name (str)

DemoRecordingCreate pydantic-model

Bases: BaseModel

A single recording within a demo study (admin create).

Fields:

Validators:

s3_key pydantic-field

Key within the demo bucket, e.g. 'sleep-edfx/SC4432E0-PSG.edf'.

validate_s3_key(v) pydantic-validator

Reject path traversal sequences and unsafe characters.

DemoStudyCreate pydantic-model

Bases: StudyMetadata

A study within a demo dataset (admin create).

Inherits the optional subject-metadata fields (age, bmi, sex) so a demo dataset can ship pre-filled demographics — registered projects then support metadata-stratified reports out of the box. The lights_off_clock marker seeds the study's lights-off event the same way at registration time.

Fields:

lights_off_clock = None pydantic-field

Wall clock "HH:MM" or "HH:MM:SS" in the recording's own frame, resolved against the study's recordings with overnight wrap — the same clock spelling as the lights import.

lights_on_clock = None pydantic-field

Same spelling and frame as lights_off_clock. Set only when the source data records it.