Unified Python Office Automation & Productivity Suite
Pyffice provides a unified Python interface for document processing, CAD, media handling, email, calendar, and comprehensive office automation with an extensible port architecture.
- Word Processing: DOC, DOCX, ODT, RTF, PDF, LaTeX
- Spreadsheets: XLS, XLSX, ODS, CSV
- Presentations: PPT, PPTX, ODP
- Ebooks: EPUB, MOBI, AZW
- Technical: Markdown, reStructuredText, AsciiDoc
- Images: PNG, JPG, GIF, BMP, WEBP, HEIC, SVG, TIFF
- Video: MP4, AVI, MKV, MOV, WEBM
- Audio: MP3, WAV, FLAC, OGG, M4A, AAC
- CAD: DXF, DWG (limited)
- Email: SMTP/IMAP with send/receive capabilities
- Calendar: iCal support with event management
- Contacts: Contact management and search
- Tasks: Task and project tracking
- Workflows: Custom workflow creation and execution
- Scripts: Python script execution framework
- CLI: 46 command-line operations (see
python -m pyffice --help) - Ports: Extensible architecture for custom integrations
- Charts: Chart generation and visualization
- Analytics: Data analytics and reporting
- Databases: Database connectivity (SQLite, PostgreSQL)
- Matrix: Matrix operations and calculations
- Web: URL fetching, parsing, scraping
- Forms: Form creation and validation
- Tags: Tagging system for organization
- Filesystems: Virtual filesystem management
pip install pyfficegit clone https://github.com/solubrew/pyffice.git
cd pyffice
pip install -e .git clone https://github.com/solubrew/pyffice.git
cd pyffice
pip install -e ".[dev]"
pip install pylint pytest bandit# Show all 22 commands
python -m pyffice --help
# Example subcommands (verified working as of T-NEW-044):
python -m pyffice document-info input.pdf
python -m pyffice document-convert input.docx output.pdf
python -m pyffice formatsThe top-level class is PyfficeCodex (re-exported from
pyffice.pyffice). Example (T-NEW-043):
from pyffice import PyfficeCodex
# Initialize
codex = PyfficeCodex()
# Add a document (real public method on PyfficeCodex /
# PyfficeDocumentManager)
codex.add_document(path="input.docx", doc_type="document")
codex.add_change("created", None, "input.docx")| Document | Description |
|---|---|
| CLI.md | Complete CLI command reference |
| AGENT.md | Agent system documentation |
| STATE.md | Project state and roadmap |
| CHANGES.md | Changelog and release notes |
| CONTRIBUTING.md | Contribution guidelines |
Pyffice uses a flexible port architecture for extensibility:
from pyffice.ports import DocumentPort, ImagePort, MediaPort
# Create custom document handler
class MyHandler(DocumentPort):
def read(self, path):
# Custom implementation
pass
def write(self, path, content):
# Custom implementation
passpyffice/
├── calendars/ # Calendar & event management
├── charts/ # Chart generation
├── config/ # Configuration management
├── contacts/ # Contact management
├── filesystems/ # Virtual filesystem
├── forms/ # Form handling
├── images/ # Image processing
├── items/ # Item utilities & colors
├── matrix/ # Matrix operations
├── notebooks/ # Jupyter notebooks
├── ports/ # Extensible port system
├── script/ # Script execution
├── skills/ # Skill framework
├── tags/ # Tagging system
├── updates/ # Update management
├── web/ # Web utilities
├── workflows/ # Workflow automation
├── cli.py # CLI interface (46 commands)
├── document.py # Document processing
└── pyffice.py # Main entry point
Create pyffice.yaml in your project root:
# General settings
general:
debug: false
log_level: INFO
# Email configuration
email:
smtp_host: smtp.gmail.com
smtp_port: 587
imap_host: imap.gmail.com
imap_port: 993
# Database configuration
database:
default: sqlite
connections:
sqlite:
path: ./data/pyffice.db
# Workflow configuration
workflows:
default_timeout: 3600
max_parallel: 4pytest tests/# Linting
pylint pyffice/
# Security
bandit -r pyffice/
# Type checking
pyright pyffice/See CONTRIBUTING.md for:
- Development setup
- Coding standards
- Pull request workflow
- Release process
MIT License - See LICENSE for details.