ParseThisIO
ParseThisIO is a powerful and flexible tool with zero additional OS dependencies that makes raw data effortlessly readable and structured for your AI and data processing workflows. Whether you're extracting information from PDFs, transforming files into Markdown, or preparing data for LLMs and RAG pipelines, ParseThisIO gets the job done—quickly, effectively, and with a touch of magic. Just install as a pip package and enjoy, no configuring around with third-party tools before you can use this package. Just parseThis.io.
For some parsers, there are API keys required. They're not required when you just don't use them—they will error on usage when no API key was found.
ParseThis aggregates multiple open-source projects to avoid re-implementing a file type mapping for content conversion.
Table of Contents
Features
- Auto-detects file types (pdf, docx, csv, pptx, xlsx, xls, json, xml, zip, mp3, mp4 and more).
- Converts any file into readable Markdown or plain text.
- Extracts structured data for use in LLM and RAG pipelines.
- Simple API for seamless integration into your workflows.
- Just forward user input to ParseThis and get Text || markdown.
The mapping of parser to file type can be found in the ParserMatrix.
import parsethisio
#get list of supported file extensions via
parsethisio.get_supported_extensions()
Prerequisites
Use Python 3.12 - maximum version supported by PyO3 - dependency of scrapegraph-ai, use a virtual environment with version 3.12
python3.12 -m venv myenv
source myenv/bin/activate
Installation
To install ParseThisIO, use pip:
pip install parsethisio
Usage
Use the parse() function to auto-detect the current type of content - when the autodetection is not working you can provide more information to help detect the type. The auto-parse function accepts any input - file_path, url strings, file byte content.
import parsethisio
#extract image description for llm
with open('tests/fixtures/test_data_diagram.png', 'rb') as f:
image_description = parsethisio.parse(f.read(), result_format=ResultFormat.TXT)
#get transcript of audio
with open('tests/fixtures/test_data_ttsmaker-test-generated-file.mp3', 'rb') as f:
audio_transcript = parsethisio.parse(f.read(), result_format=ResultFormat.TXT)
The generic parse() function detects automatically which parsers will be used based on the file content.
import parsethisio
from parsethisio import ResultFormat
#automatic parse based on file_path
parsed_pdf_text = parsethisio.parse('tests/fixtures/text_data_meeting_notes.pdf', result_format=ResultFormat.TXT)
#automatic parse based on file content
with open('tests/fixtures/text_data_meeting_notes.pdf', 'rb') as f:
parsed_pdf_text = parsethisio.parse(f.read(), result_format=ResultFormat.TXT) # works with any bytes content
#automatic parse based on string
parsed_github_repository = parsethisio.parse('https://github.com/jdde/ParseThis', result_format=ResultFormat.TXT)
#automatic parse based on YouTube URL
transcribed_youtube_text = parsethisio.parse('https://www.youtube.com/watch?v=ca7QkcAGe', result_format=ResultFormat.TXT)
Use the parser detection when you want to just find the parser and configure it differently before it parses the content.
import parsethisio
with open('tests/fixtures/text_data_meeting_notes.pdf', 'rb') as f:
file_content = f.read()
parser = parsethisio.get_parser(file_content)
text = parser.parse(file_content)
Or just directly use a parser.
from parsethisio import PDFParser
with open('tests/fixtures/text_data_meeting_notes.pdf', 'rb') as f:
text = PDFParser.parse(file_content)
For more examples how to use it - see our testing section.
ParserMatrix
Overview of dependencies used for specific parsing processes.
| File Type | Parser | Dependency | External Access Required |
|---|---|---|---|
| PDFParser | PyPDF2, Markitdown | ❌ | |
| Image | ImageParser | OpenAI GPT | ✅ env.OPENAI_API_KEY |
| Audio | AudioParser | OpenAI Whisper | ✅ env.OPENAI_API_KEY |
| URL | TextParser | scrapegraphai | ✅ env.OPENAI_API_KEY |
| YouTube | TextParser | youtube-transcript-api | ❌ |
| Github | TextParser | gitingest | ❌ |
| DOCX | OfficeParser | Markitdown | ❌ |
| PPTX | OfficeParser | Markitdown | ❌ |
| XLSX/XLS | OfficeParser | Markitdown | ❌ |
| CSV | DataParser | Markitdown | ❌ |
| JSON | DataParser | Markitdown | ❌ |
| XML | DataParser | Markitdown | ❌ |
| ZIP | ArchiveParser | Markitdown | ❌ |
If you're working with the source code, you can install all dependencies using:
pip install .
For more information, see the how we install it in our github action.
Testing
To execute tests use this:
coverage run -m pytest
#or for a single test:
pytest -k test_text_parser_github_url
License
This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.
Metadata
Release files for parsethisio 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| parsethisio-0.2.3.tar.gz | 30.2 kB | Without provenance | Details for parsethisio-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| parsethisio-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for parsethisio-0.2.3-py3-none-any.whl |
Total release size: 57.0 kB
Release files / parsethisio-0.2.3.tar.gz
| Download URL | parsethisio-0.2.3.tar.gz |
|---|---|
| Size | 30.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3862b8c04f4a4e0ee36b4c4280288540f0741a15025c29b9f8ffb5fa41716fb9
|
|
BLAKE2b-256 checksum How to use checksums |
1eeb069b7bcb3033f8028353153b851a5397e400fd55c647264ce37b77df404d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|
Release files / parsethisio-0.2.3-py3-none-any.whl
| Download URL | parsethisio-0.2.3-py3-none-any.whl |
|---|---|
| Size | 26.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f08a9d48a9fb4ee1d2c419ccb60321bf69b647cc72bfae585b2ea2809fb7b55b
|
|
BLAKE2b-256 checksum How to use checksums |
ca103770135a2c8b4c0ca516cc398efcbed3a7364f3b1ec7e31dfeb49c6d1a56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|
Security for parsethisio 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.