
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Python API wrapper for Castor EDC to fetch data from or post data to your clinical study.
Using conda and the conda-forge channel (recommended):
conda install -c conda-forge castorapi
But, you can also install using pip (https://pypi.org/project/castorapi/):
pip install castorapi
Using conda and the conda-forge channel:
conda update -c conda-forge castorapi
Using pip (https://pypi.org/project/castorapi/):
pip install castorapi --upgrade
First, make sure that save the client and secret from your Castor account in seperate client and secret files (without line endings) in a private folder on your PC. Do not share these files with anyone.
See also https://data.castoredc.com/api and https://helpdesk.castoredc.com/article/124-application-programming-interface-api
import castorapi as ca
c = ca.CastorApi('/path/to/folder/with/secret_client')
c.select_study_by_name('<CASTOR_STUDY_NAME>') # all following commands use this study selection
stats = c.request_statistics()
print(stats)
df_study, df_structure_study, df_report, df_structure_report, df_optiongroups_structure = c.records_reports_all()
users_in_study = c.request_studyuser()
print(users_in_study)
# Getting data from castor about patients in a study
c.request_study_records(record_id='CASTOR00010')
# Posting data to castor to create a new patient
# add institute_id and , request_method='POST' to use this functionality.
c.request_study_records(record_id='CASTOR00010', institute_id=<instituteID>, request_method='POST')
I am not affiliated with Castor EDC in any way. Use this software at your own risk. If this API tool does not suffice - take a look at the work from Reinier van Linschoten, who also created a Python package for two-way communication Castor EDC (2021). (https://github.com/reiniervlinschoten/castoredc_api)
FAQs
Python API wrapper for Castor EDC to fetch data from you clinical study.
We found that castorapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.