Skip to main content

import/export QDC and QDPX files for Qualitative Data Analysis (CAQDAS) Software, conforming to the XML-based REFI-QDA Standard (

Project description


portableQDA is package for import/export of information according to REFI-QDA Standard:

  • Codebooks (QDC files)
  • Projects (QDPX files, not yet implemented)

Exchange formats QDC and QDPX are:

  • suitable for structured archiving of any kind of files, including:
    • personal corpus of information analysis (coding, cites, comments)
    • the source documents themselves (any arbitrary format, including office docs, PDF, html, audio)
  • well-defined and maintained by the REF-QDA working group
  • supported and developed by a growing number of participants

QDA stands for Qualitative Data Analysis, as known in social sciences. Related Wikipedia article states: “Qualitative research relies on data obtained by the researcher by first-hand observation, interviews, recordings, […]. The data are generally non-numerical. Qualitative methods include ethnography, grounded theory, discourse analysis […]. These methods have been used in sociology, anthropology, and educational research.”


# pip install portableqda

Basic usage

testing the output format

# python -m portableqda

produces an empty codebook file in your home directory, should be suitable for import by your CAQDAS software.

testing the input format

  • export a codebook from the QDA software of your choise
  • run the following script:
import portableqda
codebook = portableqda.codebookCls(output=None) #create a codebook, will export to the screen
  • no errors should ocurr, check the output for completeness


import portableqda
#look for output in system logging

codebook = portableqda.codebookCls(output="codebook_example.qdc") #create a codebook

# create 3 codes and group them in two sets
for number in range(3):
    error,errorDesc,code = codebook.createElement(elementCls=portableqda.codeCls,

codebook.writeQdcFile() # export the codebook as a REFI-QDA 1.5 compatible QDC file

Look for the file codebook_example.qdc at your home directory. You can see more of what's happening (portableQDA is a library thus not intended for direct use), inserting the following code where the comment "look for output in system logging" is, right after the import portableqda statement:

import logging
handler = logging.StreamHandler(sys.stdout)
formatter = logging.Formatter('%(name)s - %(levelname)s - %(message)s')

Something like this will be shown:

portableqda.refi_qda - DEBUG - tree created, root node: 'CodeBook'. see REFI-QDA 1.5
portableqda.refi_qda - INFO - output is C:\Users\X\codebook_example.qdc
portableqda.refi_qda - DEBUG - added code code0 to set set1 
portableqda.refi_qda - DEBUG - added code code0 to set set2 
portableqda.refi_qda - DEBUG - added code code1 to set set1 
portableqda.refi_qda - DEBUG - added code code1 to set set2 
portableqda.refi_qda - DEBUG - added code code2 to set set1 
portableqda.refi_qda - DEBUG - added code code2 to set set2 
portableqda.refi_qda - INFO - exporting as REFI-QDC  codebook to file: C:\Users\X\codebook_example.qdc




LMXL: portableQDA relies on the excellent lxml package for the underlying tree data structure and XML handling REFI-QDA: working group pushing interoperability and open standards


GNU Lesser General Public License v3 (LGPLv3)

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

portableQDA-0.1.2.tar.gz (16.0 kB view hashes)

Uploaded Source

Built Distribution

portableQDA-0.1.2-py3-none-any.whl (16.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page