{ "info": { "author": "Alexis Roda", "author_email": "alexis.roda.villalonga@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.10", "Framework :: Django :: 1.11", "Framework :: Django :: 1.9", "Framework :: Django :: 2.0", "Framework :: Django :: 2.1", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Natural Language :: English", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development" ], "description": ".. -*- mode: rst; ispell-local-dictionary: \"en\" -*-\n\n.. $Id:$\n\n\nIntroduction\n============\n\nDjango app that exposes some internals through a REST API. Intended\nfor development tools comsumption.\n\nThe first objective is writing an emacs plugin that helps developing\ndjango apps.\n\n\nInstallation\n============\n\nTo install from *pypi* just run ``pip install djira``.\n\nTo install de development version clone the git repo:\n\n.. code-block:: bash\n\n git clone https://github.com/patxoca/djira.git\n\n\nFrom a virtualenv (recommended), install the package in development\nmode:\n\n.. code-block:: bash\n\n cd djira\n python setup.py develop\n\n\nConfiguration\n=============\n\nAdd ``djira`` to ``INSTALLED_APPS`` in your project's config and\ninclude djira URLs in your root url definition:\n\n.. code-block:: python\n\n urlpatterns = [\n ...\n url(r\"^__djira__/\", include(\"djira.urls\")),\n ...\n ]\n\n\nIn order to test the installation start the development server and\npoint a browser to ``http://localhost:8000/__djira__/__ping__/``, this\nshould display a ``pong`` response.\n\n\nCalling an endpoint\n===================\n\nAs seen in the previous section, calling an endpoint is just a matter\nof executing a ``GET`` request on some URL.\n\n**Warning**: ``djira`` provides a read-only API so it only accepts\n``GET`` and ``HEAD`` requests.\n\nIn order to improve readability the output from the following examples\nhas been *prettyfied*. Depending on the plugins you have enabled the\noutput may be different.\n\n.. code-block:: bash\n\n $ curl http://localhost:8000/__djira__/__ping__/\n \"pong\"\n\n\nIf you get no output make sure you have included the trailing slash in\nthe URL.\n\nThe API can be queried to get details about the endpoints. The\n``__list__`` endpoint returns info about the registered endpoints:\n\n.. code-block:: bash\n\n $ curl http://localhost:8000/__djira__/__list__/\n [\n {\n \"name\": \"__list__\",\n \"description\": \"List available endpoints.\",\n \"parameters\": {}\n },\n {\n \"name\": \"__ping__\",\n \"description\": \"Test service availability.\",\n \"parameters\": {}\n },\n {\n \"name\": \"__version__\",\n \"description\": \"Get djira API version.\",\n \"parameters\": {}\n },\n {\n \"name\": \"get_model_info\",\n \"description\": \"Return a dict with info about the given model.\",\n \"parameters\": {\n \"description\": \"\",\n \"type\": \"schema\",\n \"extra\": {\n \"model_id\": {\n \"description\": \"Model name.\",\n \"type\": \"string\",\n \"required\": true\n }\n }\n }\n },\n {\n \"name\": \"get_models_names\",\n \"description\": \"Return a list with the models names.\",\n \"parameters\": {}\n }\n ]\n\n\nIf the endpoint is omitted it is assumed to be ``__list__``.\n\nArguments are passed in the query string:\n\n.. code-block:: bash\n\n $ curl http://localhost:8000/__djira__/get_model_info/?model_id=FooBarModel\n {\n \"name\": [\n \"FooBarModel\"\n ],\n \"verbose_name\": \"Some descriptive text\",\n \"fields\": [\n {\n \"name\": \"my_field\",\n \"type\": \"int\"\n }\n ]\n }\n\n\nAvailable endpoints\n===================\n\nOnly the ``__list__``, ``__ping__`` and ``__version__`` endpoints are\nguaranteed to be available, the remaining endpoints (including those\nprovided by ``djira`` itself) are implemented as plugins and can be\nreplaced or removed on a per project basis.\n\n\nPlugins\n=======\n\nI want ``djira`` to be easily extensible so you can add your own\nendpoints to the API without getting a headache.\n\n``djira`` uses ``pluggy`` in order to manage the plugins.\n\n\nWriting plugins\n---------------\n\nTake a look at the ``hookspec.py`` module to see what the current\nspecification of the plugin API is.\n\nTake a look at the ``demo.py`` module for an example.\n\nTake a look at the `pluggy docs `_\nfor extra details.\n\n**Warning**: endpoints with *dunder* names are reserved for internal\nusage.\n\n\nLoading plugins\n---------------\n\nIn order to discover and load plugins ``djira`` implements two plugin\nloaders:\n\n- ``entry_points``: loads **all** plugins declared in a ``djira`` `entry\n point `_.\n Load order is undefined. This is the default loader.\n\n- ``django_config``: loads all plugins listed in the\n ``enabled_plugins`` configuracion option. This loader gives finer\n control on what plugins are loaded on what order at the expense\n of increased verbosity.\n\nThe plugin loader is configured in ``settings.py``:\n\n.. code-block:: python\n\n DJIRA = {\n \"plugin_loader\": \"djira.plugin_loader.django_config\",\n \"enabled_plugins\": [\"djira.demo\"],\n }\n\nThis example enables the ``djira.demo`` plugin.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/patxoca/djira", "keywords": "", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "djira", "package_url": "https://pypi.org/project/djira/", "platform": "", "project_url": "https://pypi.org/project/djira/", "project_urls": { "Homepage": "https://github.com/patxoca/djira" }, "release_url": "https://pypi.org/project/djira/0.2.1/", "requires_dist": [ "setuptools", "django", "pluggy" ], "requires_python": "", "summary": "Django Introspection REST API.", "version": "0.2.1" }, "last_serial": 4214595, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "fab931c26df8a0c4af025d171ef3f634", "sha256": "25e55866b79eef6880e0129392cb3612b347110db70c029d534674deba93d169" }, "downloads": -1, "filename": "djira-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "fab931c26df8a0c4af025d171ef3f634", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22256, "upload_time": "2018-08-28T11:43:14", "url": "https://files.pythonhosted.org/packages/56/e2/9183909d6090b913fd788fd684b2a1d4c5cea995d80ccdeab03792348492/djira-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4fe0f6d20fafbeec7a086653f0601b89", "sha256": "5ed29b0859b878afb6bf7a1d8c23323b5ed11675e8221f3ead0d5b93acf25049" }, "downloads": -1, "filename": "djira-0.2.0.tar.gz", "has_sig": false, "md5_digest": "4fe0f6d20fafbeec7a086653f0601b89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33458, "upload_time": "2018-08-28T11:43:16", "url": "https://files.pythonhosted.org/packages/e4/4d/9c2e14d2e8bd58c27e20376a0a5f16c8aa18b2a2de203257e36a1730502d/djira-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "99b21703e4cd40ab8a41a1f92705594f", "sha256": "8266d76de8fbbc9239a6b7906bd60a2b984bce4db922238d86da866baa9ed4f9" }, "downloads": -1, "filename": "djira-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "99b21703e4cd40ab8a41a1f92705594f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22294, "upload_time": "2018-08-28T12:11:19", "url": "https://files.pythonhosted.org/packages/63/cc/81e481c3d9f92928566d2b56b8c326f4fb88b62d736f593c9b348312c28a/djira-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ec8e8a57c74df15fed5af422ce1ccee2", "sha256": "9f591cf2d3921af8850eb6f99fd9466a71c3d85de99bf1d3b33058a170f5af0c" }, "downloads": -1, "filename": "djira-0.2.1.tar.gz", "has_sig": false, "md5_digest": "ec8e8a57c74df15fed5af422ce1ccee2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33598, "upload_time": "2018-08-28T12:11:21", "url": "https://files.pythonhosted.org/packages/58/1e/3460b55ffb484b5eec953b56945ea980e0f0ce6868dea8bc0ea441b9113c/djira-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "99b21703e4cd40ab8a41a1f92705594f", "sha256": "8266d76de8fbbc9239a6b7906bd60a2b984bce4db922238d86da866baa9ed4f9" }, "downloads": -1, "filename": "djira-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "99b21703e4cd40ab8a41a1f92705594f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22294, "upload_time": "2018-08-28T12:11:19", "url": "https://files.pythonhosted.org/packages/63/cc/81e481c3d9f92928566d2b56b8c326f4fb88b62d736f593c9b348312c28a/djira-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ec8e8a57c74df15fed5af422ce1ccee2", "sha256": "9f591cf2d3921af8850eb6f99fd9466a71c3d85de99bf1d3b33058a170f5af0c" }, "downloads": -1, "filename": "djira-0.2.1.tar.gz", "has_sig": false, "md5_digest": "ec8e8a57c74df15fed5af422ce1ccee2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33598, "upload_time": "2018-08-28T12:11:21", "url": "https://files.pythonhosted.org/packages/58/1e/3460b55ffb484b5eec953b56945ea980e0f0ce6868dea8bc0ea441b9113c/djira-0.2.1.tar.gz" } ] }