{ "info": { "author": "David Zuber", "author_email": "zuber.david@gmx.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Utilities" ], "description": "=============\nReddel-Server\n=============\n\n\n\n.. contents:: Table of Contents\n :local:\n\n`Python EPC server component `_ for\n`reddel `_.\nIt provides an easy way to send (python) source code from Emacs to the server,\ninspect or transform it via `Redbaron `_ and send the result back.\n\nAn example on how to expose a simple function to add arguments::\n\n # file: myprovidermod.py\n import reddel_server\n\n class MyProvider(reddel_server.ProviderBase)\n @reddel_server.red_src()\n @reddel_server.red_validate([reddel_server.OptionalRegionValidator(),\n reddel_server.SingleNodeValidator(),\n reddel_server.TypeValidator([\"def\"])])\n def add_arg(self, red, start, end, index, arg):\n red.arguments.insert(index, arg)\n return red\n\nStart the reddel server from Emacs::\n\n >>> (require 'epc)\n\n >>> (defvar my-epc (epc:start-epc \"reddel\" nil))\n\n >>> ;; make sure myprovidermod is in a directory within the PYTHONPATH\n >>> (epc:call-sync my-epc 'add_provider '(\"myprovidermod.MyProvider\"))\n\n >>> (message (epc:call-sync my-epc 'add_arg '(\"def foo(arg1, arg3): pass\" nil nil 1 \"arg2\")))\n \"def foo(arg1, arg2, arg3): pass\"\n\nRedbaron provides a lossless format, so even formatting and comments are preserved.\n\nInstallation\n============\n\nAt the command line::\n\n pip install reddel-server\n\nUsage\n=====\n\nYou can start a reddel server from within Emacs like shown above or start it from the command line.\nA executable ``reddel`` is provided by this project, which should suitable for most use cases.\n::\n\n $ reddel --help\n Usage: reddel [OPTIONS]\n\n Options:\n --address TEXT address to bind the server to\n --port INTEGER address to bind the server to\n -p, --provider TEXT dotted path to a provider class\n -v, --verbosity LVL Either CRITICAL, ERROR, WARNING, INFO or DEBUG\n --debug Show tracebacks when erroring.\n --help Show this message and exit.\n\n.. list-table::\n\n * - ``--address TEXT``\n - Default is ``localhost``. Can be an IP or domain name.\n * - ``--port INTEGER``\n - Defaults to a random free port.\n * - ``-p, --provider TEXT``\n - Example: ``mypkg.mymod.MyProviderClass``\n You can provide this multiple times.\n Defines additional providers that are available from the start.\n More providers can be added at runtime via ``reddel_server.ChainedProvider.add_provider``.\n * - ``-v, --verbosity LVL``\n - Define the logging level.\n * - ``--debug``\n - By default all expected exceptions are only logged without the traceback.\n If this flag is set, the traceback is printed as well.\n * - ``--help``\n - Show the help message and exit.\n\nCalling a function from within Emacs is very simple thanks to `epc `_::\n\n >>> (progn\n ... (require 'epc)\n ... (defvar my-epc (epc:start-epc \"reddel\" nil))\n ... ;; list all methods compatible with the given source\n ... (message (epc:call-sync my-epc 'list_methods '(\"def foo(arg1, arg3): pass\"))))\n\n``(epc:start-epc \"reddel\" nil)`` starts the server by executing ``reddel`` without any arguments (``nil``).\nThen you can make calls to that server by referring to the manager returned from ``epc:start-epc``.\nTo execute a call, you can use ``(epc:call-sync )``,\nwhere ```` is the manager returned by ``epc:start-epc``, ```` is the function\nand ```` is a list of arguments passed to ````.\n\nThe Builtin Functions section in the documentation provides a guide through all functions that ship with this package.\nIf you need advanced features check the reference documentation for help on how to write your own server.\n\nDocumentation\n=============\n\nhttps://reddel-server.readthedocs.io/\n\nBugs/Requests\n=============\n\nPlease use the `GitHub issue tracker `_ to submit bugs or request features.\n\nDevelopment\n===========\n\nTo run the all tests run::\n\n tox\n\nNote, to combine the coverage data from all the tox environments run:\n\n.. list-table::\n :widths: 10 90\n :stub-columns: 1\n\n - - Windows\n - ::\n\n set PYTEST_ADDOPTS=--cov-append\n tox\n\n - - Other\n - ::\n\n PYTEST_ADDOPTS=--cov-append tox\n\nLicense\n=======\n\nCopyright David Zuber, 2016.\n\nDistributed under the terms of the `GNU General Public License version 3 `_,\nreddel-server is free and open source software.\n\n\nChangelog\n=========\n\n0.2.0 (2017-01-02)\n-----------------------------------------\n\n* You can optionally specify regions for methods that take in source code.\n* Restructure the validators into several small classes.\n\n0.1.0 (2016-11-17)\n-----------------------------------------\n\n* First release on PyPI.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/storax/reddel-server", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "reddel-server", "package_url": "https://pypi.org/project/reddel-server/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/reddel-server/", "project_urls": { "Homepage": "https://github.com/storax/reddel-server" }, "release_url": "https://pypi.org/project/reddel-server/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Python EPC server for reddel.", "version": "0.2.0" }, "last_serial": 2549832, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "6b420434dee8b138934ef3398dfa5bb5", "sha256": "cf65c80156b6edf0801fa07b319e0c7fd79e6e79762c5db201424d9d3f708dcc" }, "downloads": -1, "filename": "reddel-server-0.1.0.tar.gz", "has_sig": false, "md5_digest": "6b420434dee8b138934ef3398dfa5bb5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40513, "upload_time": "2016-11-17T20:52:44", "url": "https://files.pythonhosted.org/packages/74/3d/bc2a8e45d1d4d9d15af88a88d9ae637d225a7a7a669b9e59c63f39cdf5f3/reddel-server-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "60e00dc805e41b3469f3740b7e4ba45a", "sha256": "a89b19411e1989d227fd2775df9a5cbc06d87ec9e357700a92ffd99701675a09" }, "downloads": -1, "filename": "reddel_server-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "60e00dc805e41b3469f3740b7e4ba45a", "packagetype": "bdist_wheel", "python_version": "any", "requires_python": null, "size": 23269, "upload_time": "2017-01-02T14:08:00", "url": "https://files.pythonhosted.org/packages/a2/0a/648a61dab66267e25574221f8c8a49acf37fb09e886c7608c55d6bbaa0aa/reddel_server-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fa1369022352c8830626ee26822b9a8d", "sha256": "4a6e65833e123fbfe14204f52df808c2c0d7c15d51efea2d0b3dd3c16be3151d" }, "downloads": -1, "filename": "reddel-server-0.2.0.tar.gz", "has_sig": false, "md5_digest": "fa1369022352c8830626ee26822b9a8d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44744, "upload_time": "2017-01-02T13:56:08", "url": "https://files.pythonhosted.org/packages/42/0c/55ec823738ae1e6e8beb1c179e5d1459c5cd86561daec310d8e50fcb19f2/reddel-server-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "60e00dc805e41b3469f3740b7e4ba45a", "sha256": "a89b19411e1989d227fd2775df9a5cbc06d87ec9e357700a92ffd99701675a09" }, "downloads": -1, "filename": "reddel_server-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "60e00dc805e41b3469f3740b7e4ba45a", "packagetype": "bdist_wheel", "python_version": "any", "requires_python": null, "size": 23269, "upload_time": "2017-01-02T14:08:00", "url": "https://files.pythonhosted.org/packages/a2/0a/648a61dab66267e25574221f8c8a49acf37fb09e886c7608c55d6bbaa0aa/reddel_server-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fa1369022352c8830626ee26822b9a8d", "sha256": "4a6e65833e123fbfe14204f52df808c2c0d7c15d51efea2d0b3dd3c16be3151d" }, "downloads": -1, "filename": "reddel-server-0.2.0.tar.gz", "has_sig": false, "md5_digest": "fa1369022352c8830626ee26822b9a8d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44744, "upload_time": "2017-01-02T13:56:08", "url": "https://files.pythonhosted.org/packages/42/0c/55ec823738ae1e6e8beb1c179e5d1459c5cd86561daec310d8e50fcb19f2/reddel-server-0.2.0.tar.gz" } ] }