Skip to main content

Python interface to the Colectica API

Project description

Overview

This repository provides some utility classes to use the Rest APIs on a Colectica Portal. Developed as an in-house resource for CLOSER, we are making it publicly avaliable for others using the Colectica Portal. If you have any requests or find any bugs, please log it under Issues.

If you want further advice or support please contact us at: closer@ucl.ac.uk

Colectica provide examples at https://docs.colectica.com/repository/functionality/rest-api/examples/ and the Colectica Documentation for the API is available at https://discovery.closer.ac.uk/swagger/index.html

Installation

pip install colectica-api

Basic usage

from colectica_api import ColecticaObject
C = ColecticaObject("colectica.example.com", <username>, <password>)
C.search_items(...)

See example.ipynb for a more complete example.

API relationship graph

Colectica Portal supports DDI LIfecycle, the graph below, represents the relationship between the various DDI Elements to enable retrieval of related elements, e.g. variables linked to a specific question

graph LR
  QGr[Question Group] --> Concept
  QGr[Question Group] --> Question
  QGr[Question Group] --> QG[Question Grid]
  VG[Variable Group] --> Variable
  VG[Variable Group] --> Concept
  UnG[Universe Group] --> Universe
  Variable --> Question
  Group --> Organization
  Group --> Universe
  Group --> Study
  Study --> Organization
  Study --> Universe
  Study --> DaC[Data Collection]
  Study --> DaS[Data Set]
  DaC[Data Collection] --> Organization
  DaC[Data Collection] ==> Instrument
  UnG[Universe Group] --> Universe
  Instrument --> Sequence
  Sequence --> Statement
  Sequence --> QA[Question Activity]
  QA[Question Activity] --> Question
  QG[Question Grid] --> CoS[Code Set]
  QG[Question Grid] --> II[Interviewer Instruction]
  Question --> CoS[Code Set]
  Question --> II[Interviewer Instruction]
  CoS --> Category
  CCS[Control Construct Set] --> Sequence
  Conditional --> Sequence
  CCS[Control Construct Set] --> Conditional
  CCS[Control Construct Set] --> Statement
  CCS[Control Construct Set] --> Loop
  CCS[Control Construct Set] --> QA[Question Activity]
  DaS[Data Set] --> VaS[Variable Statistic]
  DaS[Data Set] --> Variable
  VaS[Variable Statistic] --> Variable
  Variable --> VariableRepresentation
  VariableRepresentation ==> CoS[Code Set]
  VariableRepresentation ==> Numeric
  VariableRepresentation ==> Text
  VariableRepresentation ==> DateTime
  Loop --> Sequence

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

colectica_api-0.0.9.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Colectica_API-0.0.9-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file colectica_api-0.0.9.tar.gz.

File metadata

  • Download URL: colectica_api-0.0.9.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for colectica_api-0.0.9.tar.gz
Algorithm Hash digest
SHA256 89fb87904e678cc969bffa34a1f64c6a96e319388f040180a6c89d1364a6e351
MD5 c90a8676cd5936858ba6a7d51acdf590
BLAKE2b-256 07dafc42bcb816be5511e8087f2a8bafffcaa3b0d38a88958e303b2c1cb8afdc

See more details on using hashes here.

File details

Details for the file Colectica_API-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: Colectica_API-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 22.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for Colectica_API-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 f10bfee1c47bc98e8e28e793213e231e8f2399c46391f35bc18c1600fd5fd11a
MD5 f159acb59f331d0f80dcfaa29c5447fe
BLAKE2b-256 65b2846726fd0059d1989eac044dcb4d3d31596567217f79edef8765eb9e093e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page