{ "info": { "author": "Johannes Wilm", "author_email": "johannes@fiduswriter.org", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Affero General Public License v3", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "=====\nProsemirror-python\n=====\n\nThis is an unofficial and not production ready package. Contributions and improvements are welcome.\n\nThis package does not attempt at importing all of Prosemirror in Python. It is merely trying to use those parts of\nprosemirror-model and prosemirror-transform that are needed for serverside operations.\n\n\n**This package has not yet been extensively tested!**\n\nHow to use it\n-----------\n\n1. Install with `pip install prosemirror`\n\n2. In your python code, import the two included functions with:\n\n\n from prosemirror import create_doc, transform_doc\n\n3. Then create a Document object:\n\n doc = create_doc(doc_data, spec_data) # spec_data = JSON.parse(JSON.stringify(view.state.schema.spec))\n\n\n4. Thereafter create an updated Document object with the given steps applied:\n\n updated_doc = transform_doc(steps_data, doc)\n\n5. To get the JSON version of a Document object, simply use the builtin toJSON method:\n\n updated_doc.toJSON()\n\n\nSpeed\n-----------\n\nIt is not setting any speed records so far. These tests were conducted with Python 2 with the test files in the repo (applying three steps to an existing doc):\n\n prosemirror-python: 0.024s\n \n nodejs: 0.00013s\n \n jsonpatch (Python): 0.00024s\n\nSo it is around 200 times slower than nodejs and 100 times slower than using jsonpatch. It is possible that it could be sped up in various ways, for example by using pypy and a vm or alike. Please let me know if you figure something out!\n\nLicense questions\n-----------\n\n**Q - What license is this under?**\n\nA - AGPL-3, check the LICENSE file.\n\n\n**Q - I have spent the past month building a webbased text editing app. I am in stealth\nmode as my editor is really unique and I'll be the next IT Billionaire once I\nrelease it. Now I would like to use this library, but the AGPL requires me to share\nchanges I make with others! It's not fair that you are standing between me and my fortune!**\n\nA - Right. If it is worth that much to you, you can try to pay me so that I'll put it under\na more liberal license. Secondly, you could suggest taking over maintainership of this\nlibrary and promise extra features to get me to change my mind. Thirdly - you could just\nstart from scratch as long as it's not much code, but then we both lose out of any fixes\neither one of us makes.\n\nWe all need to live of something, I give a lot of code away for free\nand the only requirement there is is that you contribute any changes you make back. Not\nthat expensive, if you think about it.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://www.github.org/fiduswriter/prosemirror-python", "keywords": "", "license": "AGPL License", "maintainer": "", "maintainer_email": "", "name": "prosemirror-python", "package_url": "https://pypi.org/project/prosemirror-python/", "platform": "", "project_url": "https://pypi.org/project/prosemirror-python/", "project_urls": { "Homepage": "https://www.github.org/fiduswriter/prosemirror-python" }, "release_url": "https://pypi.org/project/prosemirror-python/0.0.4/", "requires_dist": null, "requires_python": "", "summary": "Python translation of prosemirror parts needed to modify a document in Python", "version": "0.0.4" }, "last_serial": 4521846, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "2abbf0d9f2db635fbc169265436a9c00", "sha256": "6380e6f515edc94a5861232a71fe312d6a31c1c08a0187c73b02f4786affaed7" }, "downloads": -1, "filename": "prosemirror-python-0.0.1.tar.gz", "has_sig": false, "md5_digest": "2abbf0d9f2db635fbc169265436a9c00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 60763, "upload_time": "2018-11-21T22:54:44", "url": "https://files.pythonhosted.org/packages/05/ec/591fc5f37a41b841296be3b911d6abbad4dfeb860a4bc90b4d5c54638a12/prosemirror-python-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "350eff66e6459e2277f416e289dc2ee9", "sha256": "eb1fa557dd676d2bbf74778c1572f60db7a12018d498e3b65698d1dbbbd2e5d0" }, "downloads": -1, "filename": "prosemirror-python-0.0.2.tar.gz", "has_sig": false, "md5_digest": "350eff66e6459e2277f416e289dc2ee9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 61635, "upload_time": "2018-11-22T20:27:15", "url": "https://files.pythonhosted.org/packages/35/b2/485f0f62626fc3762c07c93626962c7f35a2135f0d6961d74b5105381a90/prosemirror-python-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "be0ff00fb79b653bbc08d4485b4f46f1", "sha256": "74852202a58907dcfbfed3de884ea0a7a14541edc74ecc0ff6f6b1d4a57c672d" }, "downloads": -1, "filename": "prosemirror-python-0.0.3.tar.gz", "has_sig": false, "md5_digest": "be0ff00fb79b653bbc08d4485b4f46f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 62888, "upload_time": "2018-11-23T12:18:38", "url": "https://files.pythonhosted.org/packages/4e/3e/139c71c7996b5273767894ff5d61cc13e4fe055e67e60478b2b631fb42c4/prosemirror-python-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "a76b6bde1aee25e22afe5f34c951b809", "sha256": "8b60d066a749e2bc8617dd4d99232c817cadccb309adc527145581a834cdc28f" }, "downloads": -1, "filename": "prosemirror-python-0.0.4.tar.gz", "has_sig": false, "md5_digest": "a76b6bde1aee25e22afe5f34c951b809", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 62859, "upload_time": "2018-11-23T22:23:57", "url": "https://files.pythonhosted.org/packages/ab/3e/33ff3b24bfd4fb289e2086da4edcebec5b259c96bd88c47c58658e625f28/prosemirror-python-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a76b6bde1aee25e22afe5f34c951b809", "sha256": "8b60d066a749e2bc8617dd4d99232c817cadccb309adc527145581a834cdc28f" }, "downloads": -1, "filename": "prosemirror-python-0.0.4.tar.gz", "has_sig": false, "md5_digest": "a76b6bde1aee25e22afe5f34c951b809", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 62859, "upload_time": "2018-11-23T22:23:57", "url": "https://files.pythonhosted.org/packages/ab/3e/33ff3b24bfd4fb289e2086da4edcebec5b259c96bd88c47c58658e625f28/prosemirror-python-0.0.4.tar.gz" } ] }