surveydata.surveyplatform module

Core interface (informal) for survey data platforms.

class surveydata.surveyplatform.SurveyPlatform

Bases: object

Abstract base class (informal) for survey data platforms.

__init__()

Initialize survey platform for access to survey data.

static get_submissions_df(storage: StorageSystem) DataFrame

Get all submission data from storage, organized into a Pandas DataFrame and optimized based on the platform.

Parameters

storage (StorageSystem) – Storage system for submissions

Returns

Pandas DataFrame containing all submissions currently in storage

Return type

pandas.DataFrame

sync_data(storage: StorageSystem, attachment_storage: Optional[StorageSystem] = None, no_attachments: bool = False) list

Sync survey data to storage system.

Parameters
  • storage (StorageSystem) – Storage system for submissions (and attachments, if supported and other options don’t override)

  • attachment_storage (StorageSystem) – Separate storage system for attachments (only if needed)

  • no_attachments (bool) – True to not sync attachments

Returns

List of new submissions stored (submission ID strings)

Return type

list