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_item(...)

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.6.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

Colectica_API-0.0.6-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file Colectica_API-0.0.6.tar.gz.

File metadata

  • Download URL: Colectica_API-0.0.6.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for Colectica_API-0.0.6.tar.gz
Algorithm Hash digest
SHA256 5d68a9d085add8592dcfc242f14c941bb72a8af35e4b7c0e088f79ac7edd5eb4
MD5 b49abb20fe2fd708957c4aa81f668d10
BLAKE2b-256 c2a6ae634153cca9794a94ef29fd1b99278c48b15b1e99288032f77ff49eca7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Colectica_API-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a4ce1816240e03181e1ad16a35189b9e5ddb7c155a6740e7d3c6b7570bbc05dd
MD5 395405e6a211291593aa9b1c56d283cc
BLAKE2b-256 09c32b405f0adec088434770739078398c7bce83263f23053f04b5763f3d0cb4

See more details on using hashes here.

Supported by

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