Skip to main content

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)

Metadata

Release files for redcapy 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for redcapy 0.4.1
File Size Uploaded
redcapy-0.4.1.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for redcapy 0.4.1
File Interpreter ABI Platform
redcapy-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / redcapy-0.4.1.tar.gz

Download URL redcapy-0.4.1.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ab5415fbf79e3d1b864b04d36ee8ebbd62455ee9f77715c385c5f5d66f9eb60b
BLAKE2b-256 checksum
How to use checksums
6cb040c4b6aedceaa7e764ade0489ff47c40910c3cf3c0ea2f402048f8a82651
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release files / redcapy-0.4.1-py3-none-any.whl

Download URL redcapy-0.4.1-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d3bd28b414074542d0bef86ae68386bdf48dd785e32485d8c88ac097e6ab0d6
BLAKE2b-256 checksum
How to use checksums
0258de9c625ff1e51d84613ef809754fe3cd57bda210f9cbbb021dafc88b90a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4

1 release file

0.3.1

1 release file

0.3

1 release file

0.2

2 release files

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page