Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add serve command to start CORS enabled Flask server #235

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hemanth
Copy link

@hemanth hemanth commented Dec 31, 2024

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.

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](https://pypi.org/project/markdown-converter/).
@hemanth
Copy link
Author

hemanth commented Dec 31, 2024

@microsoft-github-policy-service agree

1 similar comment
@hemanth
Copy link
Author

hemanth commented Dec 31, 2024

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant