Skip to main content

A modern, Pydantic-based parser for REFI-QDA (.qdpx) qualitative research files.

Project description

pyrefiqda

A modern Python parser mapping REFI-QDA qualitative research files (.qdpx) to strict Pydantic models for seamless integration.

Installation

pip install pyrefiqda

Quickstart

1. Working with complete Projects (.qdpx)

from pyrefiqda import RefiProject

# Load an existing project (e.g., from NVivo, MAXQDA)
project = RefiProject.load("my_research.qdpx")

# Iterate through your codebook
for code in project.code_book.codes.code:
    print(f"Code: {code.name} (Color: {code.color})")

# Save a modified project back to a file
RefiProject.save(project, "my_research_updated.qdpx")

2. Working with Standalone Codebooks (.qdc)

If you only need to exchange coding hierarchies, REFI-QDA provides the lightweight .qdc format.

from pyrefiqda import RefiCodebook

# Load an existing codebook
codebook = RefiCodebook.load("initial_codes.qdc")

# Add a new code
from pyrefiqda.models import CodebookCodeType
import uuid

new_code = CodebookCodeType(
    guid=str(uuid.uuid4()),
    name="Example code",
    color="#FF5733",
    is_catch_all=False,
    is_codable=True
)
codebook.codes.code.append(new_code)

# Save it back
RefiCodebook.save(codebook, "updated_codes.qdc")

3. Creating a Project from Scratch

import uuid
from pyrefiqda.models import Project, UsersType, UserType
from pyrefiqda import RefiProject

# Create a user
user = UserType(guid=str(uuid.uuid4()), name="Coder")
users = UsersType(user=[user])

# Initialize an empty project ready for qualitative analysis
my_project = Project(
    name="Example study",
    origin="pyrefiqda",
    guid=str(uuid.uuid4()),
    users=users
)

RefiProject.save(my_project, "new_study.qdpx")

Why this exists

In qualitative studies, researchers use the REFI-QDA standard to exchange data. However, previous Python tools were GUI-heavy or outdated. pyrefiqda uses xsdata to auto-generate pure Pydantic models directly from the official XML schema, meaning you get flawless type-hinting, validation, and zero parsing bloat.

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

pyrefiqda-0.2.1.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

pyrefiqda-0.2.1-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file pyrefiqda-0.2.1.tar.gz.

File metadata

  • Download URL: pyrefiqda-0.2.1.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for pyrefiqda-0.2.1.tar.gz
Algorithm Hash digest
SHA256 fe99cd3f67045a6179deafd0d11deba85d26a8bb2ff165de25d01b95fc9851f5
MD5 6c3bb8a4c7d1fab23f2cb4fcd2dcbe21
BLAKE2b-256 6589c2169ce8f61c7f3158b213af71165bbfb4566a8c36210b251b9927759ee2

See more details on using hashes here.

File details

Details for the file pyrefiqda-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pyrefiqda-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for pyrefiqda-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f35e9888f4eaf338cd74f7be83334f0246724d5329c9a50fa767ebea30dd7591
MD5 ae896f0d8265e44f669d95e237e1516f
BLAKE2b-256 d1015f5c240fe39803c1387dc8ea1c6dd8fdab91fb76ff7202f91d2a7a4de6d1

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