Skip to content

API Documentation

PyForge CLI

Learn how to use PyForge CLI as a Python library and extend it with custom plugins.

Available APIs

  • Python API


    Use PyForge CLI programmatically in your Python applications

    Python API

  • Plugin Development


    Create custom converters and extend PyForge CLI

    Plugin Development

Quick Start

Using as a Python Library

from pyforge_cli.main import cli
from pyforge_cli.converters import PDFConverter, ExcelConverter

# Convert PDF to text
converter = PDFConverter()
result = converter.convert("document.pdf", "output.txt")

# Convert Excel to Parquet
excel_converter = ExcelConverter()
result = excel_converter.convert("data.xlsx", "output.parquet")

Creating a Custom Plugin

from pyforge_cli.converters.base import BaseConverter

class CustomConverter(BaseConverter):
    supported_formats = ['.custom']
    output_format = '.processed'

    def convert(self, input_path, output_path, **options):
        # Your conversion logic here
        pass

API Features

  • Type Safety: Full type hints for better development experience
  • Error Handling: Comprehensive exception hierarchy
  • Progress Tracking: Built-in progress reporting
  • Configuration: Flexible configuration system
  • Extensibility: Plugin architecture for custom formats

Next Steps