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:

pip install redcaplite

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.1.tar.gz (15.2 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.1-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for redcaplite-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7f353e76fb8f30587602510ea959ee32a8ca4d9386bd0f134911993ef989a01d
MD5 0dee75d91f051900b462b7d98a9ea744
BLAKE2b-256 84767977a3d06a7800f2061cde88b5c21cc811fdc48d226d3b3cee88cbe03973

See more details on using hashes here.

File details

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

File metadata

  • Download URL: redcaplite-1.0.1-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.9.19

File hashes

Hashes for redcaplite-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 56c5a1e3ff97992c3775e793762abe8760337de2b62c49e57cbadeb63808854b
MD5 251ceacc97aa67722a1bdb83c95557da
BLAKE2b-256 5a4ddce64564804a043b2643b31c16f9fb2e2fe99db4928134fa9d7cdf0d0ee4

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