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/portal/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 quesiton

graph LR
  VS[Variable Set] --> VG[Variable Group]
  QGr[Question Group] --> Concept
  QGr[Question Group] --> QGr[Question Group]
  VG[Variable Group] --> Variable
  VG[Variable Group] --> Concept
  CS[Concept Set] --> Concept
  MetP[Metadata Package] --> InS[Instrument Set]
  MetP[Metadata Package] --> QuS[Question Set]
  MetP[Metadata Package] --> IIS[Interviewer Instruction Set]
  MetP[Metadata Package] --> CCS[Control Construct Set]
  MetP[Metadata Package] --> CaS[Category Set]
  MetP[Metadata Package] --> CLS[Code List Set]
  QuS[Question Set] --> Question
  OrS[Organization Set] -->  Organization
  UnS[Universe Set] --> Universe
  UnG[Universe Group] --> Universe
  Project --> Series
  Series --> Organization
  Series --> Universe
  Series --> Study
  Study --> Organization
  Study --> Universe
  Study --> DaC[Data Collection]
  Study --> DaF[Data File]
  DaC[Data Collection] --> Organization
  UnG[Universe Group] --> Universe
  InS[Instrument Set] --> Instrument
  Instrument --> Sequence
  Sequence --> 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]
  CLS[Code List Set] --> CoS[Code Set]
  CoS --> Category
  CaS[Category Set] --> Category
  CCS[Control Construct Set] --> Sequence
  Conditional --> Sequence
  CCS[Control Construct Set] --> Conditional
  CCS[Control Construct Set] --> Statement
  CCS[Control Construct Set] --> QA[Question Activity]
  DaF[Data file] --> DL[Data Layout]
  DaF[Data file] --> VaS[Variable Statistic]
  VaS[Variable Statistic] --> Variable
  IIS[Interviewer Instruction Set] --> II[Interviewer Instruction]
  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.5.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

Colectica_API-0.0.5-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: Colectica_API-0.0.5.tar.gz
  • Upload date:
  • Size: 19.7 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.5.tar.gz
Algorithm Hash digest
SHA256 ddf36d837abe0e1ed4f065a05ef333de5e1c11a23c171e2a71d85dce892535ca
MD5 9973677dc5a95121d9c8971ee744f4ff
BLAKE2b-256 29cfb62ac19b9f6ba606d23a38da8b76a103cbf0313ff3d831d5f0864a68e397

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Colectica_API-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c55fe64b555adfe9935c72c9b5d35a12cd364703d75728e5caadaa340c7486c8
MD5 be138c4d15ba025ea0d6467f28433bef
BLAKE2b-256 11852759019e2020acb67fa9611bfd0364004335c480be55b142349c329bbcd5

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