A package for using Large Language Models for qualitative data analysis.
Project description
FlashQDA
FlashQDA is a Python package for LLM-powered qualitative data analysis (QDA). It provides a structured, resumable pipeline of functions that take a corpus of text documents and progressively classify, label, extract, group, and link the concepts within them. It is designed for academic researchers, policy analysts, and social scientists working with interview transcripts, policy documents, or published literature.
Installation
pip install flashqda
Optional dependency groups:
pip install "flashqda[grouping]" # semantic grouping (group_items)
pip install "flashqda[preprocessing]" # PDF and DOCX support
pip install "flashqda[anthropic]" # Anthropic Claude provider
What it does
| Step | Function | Purpose |
|---|---|---|
| 1 | preprocess_documents |
Segment .txt/.pdf/.docx files into sentences or paragraphs |
| 2 | classify_items |
LLM binary/multiclass classification (e.g. causal / non-causal) |
| 3 | label_items |
Apply user-defined filter tags at any stage |
| 4 | extract_from_classified |
Structured extraction of relationships (e.g. cause/effect pairs) |
| 5 | refine_extracted |
LLM validation and correction of extracted pairs |
| 6 | explode_extractions |
Normalize from one row per source to one row per extracted item |
| 7 | embed_items |
Generate and cache vector embeddings |
| 8 | group_items |
AHC semantic clustering with LLM-generated category labels |
| 9 | link_items |
Cosine-similarity linking of semantically related items |
Built-in pipeline presets: "causal", "thematic", "tradeoff", "synergy".
Quick example
import flashqda
# Set up project
flashqda.initialize_project("/path/to/my_project")
project = flashqda.ProjectContext("/path/to/my_project")
config = flashqda.PipelineConfig.from_type("causal")
# Run the pipeline
flashqda.preprocess_documents(project=project, granularity="sentence")
classified = flashqda.classify_items(
project=project, config=config,
input_file=project.data / "sentence.csv"
)
extracted = flashqda.extract_from_classified(
project=project, config=config, input_file=classified
)
exploded = flashqda.explode_extractions(project=project, config=config, input_file=extracted)
embedding_file = flashqda.embed_items(project=project, config=config, input_file=exploded)
flashqda.link_items(project=project, config=config,
input_file=exploded, embedding_file=embedding_file)
Supported providers
LLM: openai (default), anthropic, ollama (local), openai_compatible
Embeddings: openai, sentence_transformers, openai_compatible
Sensitive-data workflows are fully supported via local Ollama models — no API key required.
Documentation
Full walkthrough with all functions and examples: docs/QUICK_START.md
API reference: help(flashqda.classify_items) (all public functions have docstrings)
Citation
If you use FlashQDA in your research, please cite:
Kearney, N. (2026). flashQDA (v1.2.2). https://github.com/nmkearney/flashqda
Links
Project details
Release history Release notifications | RSS feed
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 flashqda-1.2.2.tar.gz.
File metadata
- Download URL: flashqda-1.2.2.tar.gz
- Upload date:
- Size: 59.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a61b520c713ed647d024118d386efb37ffac13defbc3473cb6db04aaccd5ceab
|
|
| MD5 |
2908d8e776f7d6dd1ad38a0f6a7c10e0
|
|
| BLAKE2b-256 |
9a35d9efd2fc2878df1324ad305bdd70d098a08bef313e8fc8743a438a1bc6e5
|
File details
Details for the file flashqda-1.2.2-py3-none-any.whl.
File metadata
- Download URL: flashqda-1.2.2-py3-none-any.whl
- Upload date:
- Size: 68.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09784051441e9ea141247db62cf61d2ab757ec7cece54ab905a0dbe3f03133fe
|
|
| MD5 |
25b82f12ebf7d7a0fffa8bd69641137c
|
|
| BLAKE2b-256 |
41a66d8fdaa919ec0919c82635bdb335e5c05ead62ce37843d42d6b22dc45f01
|