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:
-
Have a Redivis account (create one at https://redivis.com/?createAccount if you don't have one).
-
Authenticate using the Redivis Python Client:
- When you first use a function in
irwthat connects to Redivis (e.g.list_tables()), a browser window will open, prompting you to sign in to your Redivis account. - After signing in, click Allow to grant access for the Redivis Python Client.
- Once authentication is successful, close the browser window. You will see the message "Authentication was successful" in console.
- When you first use a function in
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 exampleavailable_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
-
Clone the repository:
git clone https://github.com/itemresponsewarehouse/Python-pkg.git cd Python-pkg
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b00f0655faa89971ae45bb5e4b0f0085a157a5012e7de79b0a2dc5cca2a2acf
|
|
| MD5 |
4fc840387742b606ccf2ba25f2e8ce27
|
|
| BLAKE2b-256 |
958bd923e98f09ca7e9f757f30c5e6286a904be2fcbc68e064f2551f1304ec36
|
Provenance
The following attestation bundles were made for irw-0.1.3.tar.gz:
Publisher:
release.yml on itemresponsewarehouse/Python-pkg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
irw-0.1.3.tar.gz -
Subject digest:
5b00f0655faa89971ae45bb5e4b0f0085a157a5012e7de79b0a2dc5cca2a2acf - Sigstore transparency entry: 2751953052
- Sigstore integration time:
-
Permalink:
itemresponsewarehouse/Python-pkg@cd1e991dd599409e74d0bcd84b2aa45f85175d89 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/itemresponsewarehouse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cd1e991dd599409e74d0bcd84b2aa45f85175d89 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13a316d479c0c92e88bcaa777d0aa114a60977c6ee86060dbc3ae04e6c8760b6
|
|
| MD5 |
804440a6544157d6c1ad5c87cd9aaee5
|
|
| BLAKE2b-256 |
83f408fadecb27db74c77edab376408dd5f56254b0b4d91318faf95cd446be50
|
Provenance
The following attestation bundles were made for irw-0.1.3-py3-none-any.whl:
Publisher:
release.yml on itemresponsewarehouse/Python-pkg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
irw-0.1.3-py3-none-any.whl -
Subject digest:
13a316d479c0c92e88bcaa777d0aa114a60977c6ee86060dbc3ae04e6c8760b6 - Sigstore transparency entry: 2751953078
- Sigstore integration time:
-
Permalink:
itemresponsewarehouse/Python-pkg@cd1e991dd599409e74d0bcd84b2aa45f85175d89 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/itemresponsewarehouse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cd1e991dd599409e74d0bcd84b2aa45f85175d89 -
Trigger Event:
push
-
Statement type: