markitdown icon indicating copy to clipboard operation
markitdown copied to clipboard

Add serve command to start CORS enabled Flask server

Open hemanth opened this issue 11 months ago • 2 comments

Add a serve command to start a CORS-enabled Flask server for file conversion.

  • New Flask Server: Add src/markitdown/server.py to define a Flask server with CORS enabled and a route to convert files to markdown.

  • Dependencies: Update pyproject.toml to include flask and flask-cors as dependencies and add the serve command to the [project.scripts] section.

  • Documentation: Update README.md with instructions on how to use the serve command.

  • Tests: Add tests in tests/test_markitdown.py to verify the functionality of the serve command, including handling both URL and file POST data.

In case we decide not to have serve command we have markdown-converter.

hemanth avatar Dec 31 '24 05:12 hemanth

@microsoft-github-policy-service agree

hemanth avatar Dec 31 '24 06:12 hemanth

@microsoft-github-policy-service agree

hemanth avatar Dec 31 '24 06:12 hemanth