Skip to main content

Ws-Mark-Flow AI Converter

Convert files from various sources (SharePoint, S3, Azure Blob, etc.) to Markdown and upload to destinations (Google Drive, SharePoint, etc.).

Features

  • Multi-source support: SharePoint, S3, Azure Blob Storage (extensible)
  • Multi-destination support: Google Drive, SharePoint, S3 (extensible)
  • File conversion: PDF, DOCX, PPTX, XLSX, CSV, images, and more → Markdown
  • Incremental conversion: Only converts files not already in destination
  • Job persistence: MongoDB-backed job storage for resumable pipelines
  • REST API: FastAPI-based API for job management
  • Progress tracking: Real-time conversion progress and statistics

Architecture

┌─────────────┐     ┌──────────────┐     ┌───────────────┐
│   Source    │────▶│  Converter   │────▶│  Destination  │
│ (SharePoint)│     │ (MarkItDown) │     │(Google Drive) │
└─────────────┘     └──────────────┘     └───────────────┘
                           │
                    ┌──────▼──────┐
                    │   MongoDB   │
                    │ (Job Store) │
                    └─────────────┘

Installation

# Install dependencies
uv pip install -r requirements.txt

# Copy environment file
cp .env.example .env
# Edit .env with your MongoDB URI

# Run with auto-reload
uvicorn src.main:app --reload --port 8000

API Documentation

  • API docs: http://localhost:8000/docs
  • Redocly UI: http://localhost:8000/redoc
  • OpenAPI spec: http://localhost:8000/openapi.json

Supported Integrations

Sources

  • SharePoint (sharepoint): Microsoft Graph API
  • More coming: S3, Azure Blob, Local filesystem

Destinations

  • Google Drive (google_drive): Google Drive API v3
  • More coming: SharePoint, S3, Azure Blob

Supported File Types

Converted using Microsoft MarkItDown, Docling or LLM-based analysis for complex PDFs & images.

  • Documents: PDF, DOCX, DOC, RTF, TXT
  • Presentations: PPTX, PPT
  • Spreadsheets: XLSX, XLS, CSV
  • Web: HTML, XML, JSON, YAML
  • Images: PNG, JPG, GIF, BMP, TIFF (OCR)

Configuration

Main Environment Variables

Variable Default Description
AUTH_USERNAME admin Basic auth username
AUTH_PASSWORD yourpassword Basic auth password
MONGODB_URI mongodb://localhost:27017 MongoDB connection string
MONGODB_DATABASE converter Database name
TEMP_DIR ./.data/converter Temporary file storage

Development

🔖 requirements

  • install uv venv package management
py -m pip install --upgrade uv
# create venv
uv venv
# activate venv
#win: .venv/Scripts/activate
#linux: source .venv/bin/activate
  • project requirements update
python -m requirements_update
uv pip install --upgrade -r requirements.txt
  • build tools
uv pip install --upgrade setuptools build twine 

🪛 build

  • clean dist and build package
if (Test-Path ./dist) {rm ./dist -r -force}; `
python -m build && twine check dist/*
  • linux/mac
[ -d ./dist ] && rm -rf ./dist
python -m build && twine check dist/*

📦 test / 🧪 debugger

Install the package in editable project location

uv pip install -U -e .
uv pip show ws-mark-flow

code quality tools

# .\src\robot
uv pip install -U scanreq prospector[with_everything]
## unused requirements
scanreq -r requirements.txt -p ./src
## style/linting
prospector ./src -t pylint -t pydocstyle
## code quality/complexity
prospector ./src -t vulture -t mccabe -t mypy 
## security
prospector ./src -t dodgy -t bandit
## package
prospector ./src -t pyroma

✈️ publish

  • pypi

    twine upload --verbose dist/* 
    

Docker

  • Build the Docker image (override version at build time if needed)
docker build -t ws-mark-flow ./app

# Copy environment file
cp .env.example ./app/.env
# Edit .env 

docker run -p 80:80 --env-file ./app/.env ws-mark-flow
# use host.docker.internal for MongoDB connection from container to host
docker run --add-host=host.docker.internal:host-gateway -p 80:80 --env-file ./app/.env ws-mark-flow

License

MIT

Metadata

Release files for ws-mark-flow 0.0.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ws-mark-flow 0.0.16
File Size Uploaded Provenance Actions
ws_mark_flow-0.0.16.tar.gz 100.0 kB Without provenance Details for ws_mark_flow-0.0.16.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ws-mark-flow 0.0.16
File Interpreter ABI Platform Actions
ws_mark_flow-0.0.16-py3-none-any.whl Python 3 none any Details for ws_mark_flow-0.0.16-py3-none-any.whl

Total release size: 216.5 kB

Release files / ws_mark_flow-0.0.16.tar.gz

Download URL ws_mark_flow-0.0.16.tar.gz
Size 100.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5b1a17f3a213f091a6152404caa00c894b1489a85b4d777dd6232a97b4eca6e0
BLAKE2b-256 checksum
How to use checksums
01549ce20658ce49b03c6eefd79b14d019c700d92849f38f1770ce2bf03c7ea0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / ws_mark_flow-0.0.16-py3-none-any.whl

Download URL ws_mark_flow-0.0.16-py3-none-any.whl
Size 116.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b0cec5e2093d3604c13a0641d7b26be965ac0f8987a61865aa666a2ed019e3f
BLAKE2b-256 checksum
How to use checksums
8c506de2a566abdb36f207a5b405c23f0c295f5c234833657345a13efe42baf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for ws-mark-flow 0.0.16

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page