Metadata-Version: 2.4
Name: drf_md2docx
Version: 1.0.0
Summary: DRF API for Converting Markdown to Docx
Home-page: https://github.com/suqingdong/drf_md2docx
Author: suqingdong
Author-email: suqingdong1114@gmail.com
License: MIT License
Classifier: Development Status :: 5 - Production/Stable
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Description-Content-Type: text/markdown
Requires-Dist: django
Requires-Dist: djangorestframework
Requires-Dist: python-md2docx
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: requires-dist
Dynamic: summary

# DRF API for Converting Markdown to Docx

## Installation

```bash
pip install drf_md2docx
```

## Usage

### Create a new project

```bash
django-admin startproject myproject
cd myproject
```

### Add the app to your project's `settings.py`

```python
INSTALLED_APPS = [
    ...
    'drf_md2docx',
    ...
]
```

### Add configurations to your project's `settings.py`

```python
MEDIA_ROOT = 'data/'
MEDIA_URL = '/api/media/'

MD2DOCX_PERMISSIONS = [
    permissions.AllowAny,
]

MD2DOCX_OUTPUT_DIR = Path(MEDIA_ROOT) / 'md2docx'
```

### Add urlpatterns to your project's `urls.py`

```python
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
    path("api/md2docx/", include('drf_md2docx.urls')),
]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
```

## Request and Response

![alt text](static/request.png)

![alt text](static/response.png)
