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

Uploaded Source

File details

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

File metadata

  • Download URL: redcapy-0.3.1.tar.gz
  • Upload date:
  • Size: 5.1 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.3.1.tar.gz
Algorithm Hash digest
SHA256 f5ac3389f1a7442551022c4866e261282579a1d1bf1d321e1439001fc2b61d2f
MD5 057a79646805cb9e3707c294f371f138
BLAKE2b-256 7ddbbf733fc7c66e409a64ed221a2009d9c1e2ccfe9d7589247959ad512e635b

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