Skip to main content

A Lightweight Python Client for REDCap

Project description

RedcapLite

RedcapLite is a Python package for interacting with the REDCap API. This package provides methods to interact with different API endpoints in a straightforward way.

Installation

To install the package, clone the repository and install it using pip:

git clone https://github.com/jubilee2/RedcapLite.git
cd RedcapLite
pip install .

Usage

Importing the Package

To use the RedcapLite package, import it in your Python script:

import RedcapLite

Creating an Instance

Create an instance of the RedcapClient class by providing the API URL and token:

r = RedcapLite.RedcapClient('https://redcap.vumc.org/api/', 'your_token')

Methods

get_arms()

Retrieve the list of arms from the REDCap API.

arms = r.get_arms()
print(arms)

delete_arms(arms)

Delete the specified arms. Provide a list of arm IDs to delete.

r.delete_arms(arms=[3])

Example

Here’s a complete example of how to use the RedcapLite package:

import RedcapLite

# Create an instance of RedcapClient
r = RedcapLite.RedcapClient('https://redcap.vumc.org/api/', 'your_token')

# Get arms
arms = r.get_arms()
print("Arms:", arms)

# Delete specific arms
r.delete_arms(arms=[3])
print("Arm 3 deleted successfully.")

Contributing

If you would like to contribute to the project, please fork the repository, make your changes, and submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

redcaplite-1.0.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

redcaplite-1.0.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file redcaplite-1.0.0.tar.gz.

File metadata

  • Download URL: redcaplite-1.0.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.13

File hashes

Hashes for redcaplite-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d25f796588c57a19aa5daf5364463dfefcf62adf95d64ca47a8ee72bf1662944
MD5 35ab3320cff568f114d3203b6c040c3f
BLAKE2b-256 b9b821622ab28c24a2ec6fa52648e258965d68f15e2a23f41c8a0985317115f9

See more details on using hashes here.

File details

Details for the file redcaplite-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: redcaplite-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.13

File hashes

Hashes for redcaplite-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe2caabe105c5c9e611362a82167bfdb446bab02e4246ed4387b4bc7406251b6
MD5 04a44fbf821658c3113ee7c9288ed505
BLAKE2b-256 21f1ba5f1559d7b95b5821e5c6676ea4d4c7159ca1edb78462fffe69e62c4d93

See more details on using hashes here.

Supported by

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