Skip to main content

Python port of the quill.js delta library that enables operational transformation with aditional functionality for rendering html

Project description

Delta (Python Port)

Python port of the javascript Delta library for QuillJS:

Some basic pythonizing has been done, but mostly it works exactly like the above library.

There is no other python specific documentation at this time, sorry. Please see the tests for reference examples.

Rendering HTML in Python

This library includes a module delta.html that renders html from an operation list, allowing you to render Quill Delta operations in full from a Python server.

For example:

from delta import html

ops = [ 
    { "insert":"Quill\nEditor\n\n" },
    { "insert": "bold",
      "attributes": {"bold": True}},
    { "insert":" and the " },
    { "insert":"italic",
      "attributes": { "italic": True }},
    { "insert":"\n\nNormal\n" },


Result (line formatting added for readability):

<p><strong>bold</strong> and the <em>italic</em></p>

See for more examples.



> python test


> py.test

Project details

Download files

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

Files for quill-delta, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size quill_delta-1.0.0-py3-none-any.whl (11.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size quill-delta-1.0.0.tar.gz (10.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page