Skip to main content

DRF API for Converting Markdown to Docx

Installation

pip install drf_md2docx

Usage

Create a new project

django-admin startproject myproject
cd myproject

Add the app to your project's settings.py

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

Add configurations to your project's settings.py

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

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

alt text

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drf_md2docx-1.0.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

drf_md2docx-1.0.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file drf_md2docx-1.0.0.tar.gz.

File metadata

  • Download URL: drf_md2docx-1.0.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for drf_md2docx-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cb69c9618173676567fa05e2409a4aa3238ff3b53cdc39f3057fdc3eab03d212
MD5 f6be1014c671d12e0a7ec4389bdf9800
BLAKE2b-256 2abdaaee97d974e4da96abd5a7165013d88b756dfa0698fb01139ab1398e31ef

See more details on using hashes here.

File details

Details for the file drf_md2docx-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: drf_md2docx-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for drf_md2docx-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec9afa633e0f6a35d93c2b5f44f4504586d6957f5224c2ff0678accdb7806f2e
MD5 465f7871b5c06275af4c0b875b30b8cf
BLAKE2b-256 ff0cfeacfe94fe8334c3a848bf28e6335b451fe16b19fc0823eaa2f3f57c5244

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page