Skip to main content

Python package to access REDCAP API

Project description

redcapy

Library for accessing RedCap API from Python

Installation

Install the package with pip directly with:

pip install redcapy

Implemented functionalities

Get data from API

By now the implemented functionalities are for obtaining data from the REDCAP server, no API calls related with saving new data data or deleting data has been implemented. Available API calls are:

import redcapy
import datetime
redcap_handler = redcapy.request.APIHandler(api_url=api_url, token=token)
metadata = redcap_handler.get_metadata()
redcap_version = redcap_handler.get_redcap_version()
users = redcap_handler.get_users()
arms = redcap_handler.get_arms()
events = redcap_handler.get_events()
field_names = redcap_handler.get_field_names()
file = redcap_handler.get_file(record=1)
form_event_mapping = redcap_handler.get_form_event_mapping()
instruments_pdf = redcap_handler.get_instruments_pdf(output_file="./instruments.pdf")
instruments = redcap_handler.get_instruments()
project = redcap_handler.get_project_info()
report = redcap_handler.get_reports(1)
participant_list = redcap_handler.get_participant_list(instrument=instruments[-1]['instrument_name'])
records = redcap_handler.get_records()
date_range_begin = datetime.datetime.strptime("2019-10-10", "%Y-%m-%d")
date_range_end = datetime.datetime.strptime("2019-12-10", "%Y-%m-%d")
records = redcap_handler.get_records(date_range_begin=date_range_begin, date_range_end=date_range_end)

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

redcapy-0.2.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

redcapy-0.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file redcapy-0.2.tar.gz.

File metadata

  • Download URL: redcapy-0.2.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.6

File hashes

Hashes for redcapy-0.2.tar.gz
Algorithm Hash digest
SHA256 64a22ae9c3838307acf55617e5e511419f040172cc9cdddbb5896017d266817c
MD5 3dcd0e6a4b234ae7dc932b1536ed2cc0
BLAKE2b-256 44fbc2daf0e256550c8858f45d5fc431558a134323d1f356365cac205caa6bda

See more details on using hashes here.

File details

Details for the file redcapy-0.2-py3-none-any.whl.

File metadata

  • Download URL: redcapy-0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.6

File hashes

Hashes for redcapy-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 822180993e8ddacaa2c090ceeb13043efaa9b3c55b84da4a8573b0441bf1980a
MD5 7f289f6a99e61d1b58cc1679be19ddd8
BLAKE2b-256 07adadab6403284d822082efa58217076e923e936320432e64b0ba708ce06bc5

See more details on using hashes here.

Supported by

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