Skip to content

OdkCentralAsync

svcfmtm edited this page Apr 4, 2024 · 4 revisions

OdkCentral

::: osm_fieldwork.OdkCentralAsync.OdkCentral options: show_source: false heading_level: 3

::: osm_fieldwork.OdkCentralAsync.OdkProject options: show_source: false heading_level: 3

::: osm_fieldwork.OdkCentralAsync.OdkEntity options: show_source: false heading_level: 3

Usage

  • An async context manager must be used (async with).
  • As of 2024-04 the session and authentication must be handled manually.
from osm_fieldwork.OdkCentralAsync import OdkProject

async with OdkProject(
    url="http://server.com",
    user="[email protected]",
    passwd="password",
) as odk_central:
    await odk_central.create_session()
    await odk_central.authenticate()

    projects = await odk_central.listProjects()
Clone this wiki locally