Skip to main content

docitup is a Python package designed to simplify document processing for LangChain. It provides various loaders to extract content from different file types and convert them into LangChain-compatible document classes, ready for storage in LangChain-supported vector stores.

Project description

Docitup

This package provides various document loaders that utilize different methods for processing and chunking documents. It is designed to facilitate the loading of documents in various formats into a structured format suitable for using them with langchain vector databases

Overview

The package includes the following loaders:

  • PyMUPdf4LLMLoader: Loads and splits documents from files using the pymupdf4llm library.
  • MarkitdownLoader: Loads documents using the MarkItDown library.
  • LlamaparseLoader: Loads documents using the LlamaParse library and processes different file types.
  • DoclingPDFLoader: Converts documents to text and splits them accordingly.

Installation

To install this package, simply run:

pip install docitup 

Usage

PyMUPdf4LLMLoader

from docitup import PyMUPdf4LLMLoader 
  
loader = PyMUPdf4LLMLoader(file_path='path/to/your/file.pdf')  
documents = loader.load()   

MarkitdownLoader

from docitup import MarkitDownLoader
  
loader = MarkitdownLoader(file_path='path/to/your/file.md')  
documents = loader.load()  

LlamaparseLoader

from docitup import LlamaparseLoader
from llama_parse.utils import ResultType
  
loader = LlamaparseLoader(file_path='path/to/your/directory', result_type=ResultType.MD, api_key='your_api_key')  
documents = loader.load()  

DoclingPDFLoader

from docitup import DoclingLoader
  
loader = DoclingLoader(file_path='path/to/your/file.pdf')  
documents = loader.load()

Configuration Options

Each loader can be configured with the following optional parameters:

splitter_type: The type of text splitter to use ("recursive" or other).

chunk_size: The size of each chunk (default is 1000).

chunk_overlap: The number of overlapping characters between chunks (default is 100).

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests for improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Acknowledgements

This package is made possible by the following libraries:

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

docitup-0.1.1.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

docitup-0.1.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file docitup-0.1.1.tar.gz.

File metadata

  • Download URL: docitup-0.1.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.0

File hashes

Hashes for docitup-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c77786d1fc4aff714d8f5021f8d806aacc63c84f1fdbe1a0f5d4f67f6d0081db
MD5 1ccf2e10fdabbfd731df368d0307cbb9
BLAKE2b-256 8d12e11b0e51a9c66d73c2450184309a061bbb3e78698b146c3deb1adbd70e03

See more details on using hashes here.

File details

Details for the file docitup-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: docitup-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.0

File hashes

Hashes for docitup-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ea773f18f655a55e5da8ab3953866f8e4838fffa2443e9bc75dcd45a4053494
MD5 c8c0682f983bff20bc2eea8c88a55d01
BLAKE2b-256 a5a8b9ea1d5c908e6c2fe41c049f090650d45f524d3a3a8325d5037ebfeeb87f

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