Skip to main content

PyCap: Python interface to REDCap

Project description

PyCap is a python module exposing the REDCap API through some helpful abstractions. Information about the REDCap project can be found at http://project-redcap.org/.

Available under the BSD (3-clause) license.

Features

Currently, these API calls are available:

  • Export Records

  • Export Metadata

  • Import Records

Requirements

  • requests (> 0.6.4)

    $ easy_install requests

Usage

>>> import redcap
# Init the project with the api url and your specific api key
>>> project = redcap.Project(api_url, api_key)
>>> all_data = project.export_records()

# filter your data
>>> q = redcap.Query('age', {'ge':12})
>>> subset = project.filter(q)

# import data
>>> data = [{'subjid': i, 'age':a} for i, a in zip(range(1,6), range(7, 13))]
>>> num_processed = project.import_records(data)

Installation

$ git clone git://github.com/VUIIS/PyCap.git PyCap
$ cd PyCap
$ python setup.py install

OR

$ easy_install PyCap

TODO

  • More Tests

  • File export and import

HISTORY

0.3.4 (2012-01-12)

  • New documentation

0.3.3 (2011-11-21)

  • Bug fix when exporting all fields

0.3.2 (2011-11-21)

  • Works with current version of requests

  • Under-the-hood changes (only json is used for RCRequest)

  • Bug fix in Project.filter

0.3.1 (2011-11-02)

  • Bug fix in import_records

0.3 (2011-09-27)

  • Using Kenneth Reitz’s request module, greatly simplifying request code.

0.21 (2011-09-14)

  • First public release on PyPI

  • Version bump

0.1 (2011-09-14)

  • Basic import, export, metadata

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

PyCap-0.4.tar.gz (9.0 kB view details)

Uploaded Source

File details

Details for the file PyCap-0.4.tar.gz.

File metadata

  • Download URL: PyCap-0.4.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyCap-0.4.tar.gz
Algorithm Hash digest
SHA256 827e22014dd3ac709de501a4e139b81dae702253a15923ccea85e87e2eb07c53
MD5 8be4d2d6cb9f62b785d3bbed5528e127
BLAKE2b-256 0f4ad1be94cd42cc740d2202b17b0f416010e5eeeea0760da0e792e5520cd55d

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