Skip to main content

irw: A Python Package for the Item Response Warehouse

This repository hosts the Python package irw, which provides programmatic access to the Item Response Warehouse (IRW), an open repository of harmonized item response data hosted on Redivis.

Project map: ARCHITECTURE.md in ben-domingue/irw — which repo owns what, where the data lives, and which document is authoritative when two disagree.

Installation

Recommended: Use a virtual environment (prevents conflicts with other packages):

# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install the package
python -m pip install --upgrade pip
python -m pip install "git+https://github.com/itemresponsewarehouse/Python-pkg.git"

Requirements

  • Python 3.9 or higher
  • pip

If you encounter any installation issues, please open an issue.

IMPORTANT: Redivis Authentication

The IRW tables are hosted on Redivis, a data management platform. To access these datasets, you'll need to:

  1. Have a Redivis account (create one at https://redivis.com/?createAccount if you don't have one).

  2. Authenticate using the Redivis Python Client:

    1. When you first use a function in irw that connects to Redivis (e.g. list_tables()), a browser window will open, prompting you to sign in to your Redivis account.
    2. After signing in, click Allow to grant access for the Redivis Python Client.
    3. Once authentication is successful, close the browser window. You will see the message "Authentication was successful" in console.

Note: You only need to authenticate once per session. For detailed instructions, refer to the Redivis Python Client documentation.

Usage Examples

See the examples/ directory:

  • example.py - Complete workflow example
  • available_methods.md - Reference guide for all available methods

Example workflow:

import irw

# Get database information
irw.info()

# View available tables
tables = irw.list_tables()
tables_with_metadata = irw.list_tables(include_metadata=True)

# Get table info
irw.info("agn_kay_2025")  # Table metadata

# Fetch a table
df = irw.fetch("agn_kay_2025")
# Convert to response matrix
resp_matrix = irw.long2resp(df)

# Explore available filters
filters = irw.get_filters()  # Returns list of filter names
irw.describe_filter('construct_type')  # Get values for a specific filter

# Filter and fetch tables
filtered = irw.filter(n_responses=[1000, None], construct_type="Affective/mental health")
dfs = irw.fetch(filtered)

# Get BibTeX citation
irw.save_bibtex("agn_kay_2025")  # Returns BibTeX entry
# Download table
irw.download("agn_kay_2025", path="data.csv")

# Browse collections: labelled groupings of tables
irw.collections()                     # all collections, with coverage and table counts
tabs = irw.collection("depression")   # the table names in one collection
irw.collection_members(tables="frac20")  # which collections is this table in?

# Which version of IRW is this? (cite this number)
irw.version()                         # newest IRW version and its dataset pins
irw.version("2026-08-01")             # what was live on that date

Development

Setting up Development Environment

  1. Clone the repository:

    git clone https://github.com/itemresponsewarehouse/Python-pkg.git
    cd Python-pkg
    
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install development dependencies:

    pip install -e .
    

Feedback and Contributions

If you encounter issues or have suggestions for improving irw, please submit them on the GitHub Issues page. Contributions are welcome!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

irw-0.1.3.tar.gz (65.1 kB view details)

Uploaded Source

Built Distribution

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

irw-0.1.3-py3-none-any.whl (53.8 kB view details)

Uploaded Python 3

File details

Details for the file irw-0.1.3.tar.gz.

File metadata

  • Download URL: irw-0.1.3.tar.gz
  • Upload date:
  • Size: 65.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for irw-0.1.3.tar.gz
Algorithm Hash digest
SHA256 5b00f0655faa89971ae45bb5e4b0f0085a157a5012e7de79b0a2dc5cca2a2acf
MD5 4fc840387742b606ccf2ba25f2e8ce27
BLAKE2b-256 958bd923e98f09ca7e9f757f30c5e6286a904be2fcbc68e064f2551f1304ec36

See more details on using hashes here.

Provenance

The following attestation bundles were made for irw-0.1.3.tar.gz:

Publisher: release.yml on itemresponsewarehouse/Python-pkg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file irw-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: irw-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 53.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for irw-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 13a316d479c0c92e88bcaa777d0aa114a60977c6ee86060dbc3ae04e6c8760b6
MD5 804440a6544157d6c1ad5c87cd9aaee5
BLAKE2b-256 83f408fadecb27db74c77edab376408dd5f56254b0b4d91318faf95cd446be50

See more details on using hashes here.

Provenance

The following attestation bundles were made for irw-0.1.3-py3-none-any.whl:

Publisher: release.yml on itemresponsewarehouse/Python-pkg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.4

2 files

This release

0.1.3 This release

2 files

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