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
Built Distribution
File details
Details for the file colectica_api-0.0.7.tar.gz
.
File metadata
- Download URL: colectica_api-0.0.7.tar.gz
- Upload date:
- Size: 19.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0e5088b55921cc1f0cc4d326bc6e7e11e030d56fe863b76449b69fe74f5dae9 |
|
MD5 | 0640ba750525d961e0d83b2d70f562e7 |
|
BLAKE2b-256 | 985e080693abf138d60fba917f16776f4c1d32fad0e03751eed9ebabc69ebe7c |
File details
Details for the file Colectica_API-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: Colectica_API-0.0.7-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f76c8e643ed5a9d78ba68f055cc359baeb39fef1b613c99eba26887bfe748542 |
|
MD5 | 219308b258b5af17d8817b09124035c6 |
|
BLAKE2b-256 | bdd3d2d71e6e986221221730808a20ebdd021b3abb9e33aea3dcc6a93797e7a0 |