{ "info": { "author": "Digium, Inc.", "author_email": "dlee@digium.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "\n**ORIGINAL REPO:** [digium/swagger-py](https://github.com/digium/swagger-py.git)\n\nAbout\n-----\n\nSwagger.py is a Python library for using\n`Swagger ` [codet-swaggerpy](https://github.com/Thulebona/codet-swaggerpy.git) __ defined API's.\n\nSwagger itself is best described on the Swagger home page:\n\n Swagger is a specification and complete framework implementation for\n describing, producing, consuming, and visualizing RESTful web\n services.\n\nThe `Swagger\nspecification `__ defines\nhow API's may be described using Swagger.\n\nSwagger.py also supports a WebSocket extension, allowing a WebSocket to\nbe documented, and auto-generated WebSocket client code.\n\npython -v\n---------\n Python3\n\nUsage\n-----\n\nInstall the latest release from PyPI.\n\n::\n\n $ sudo pip install codet-swaggerpy\n\nOr install from source using the ``setup.py`` script.\n\n::\n\n $ pip install -e ./\n \nAPI\n===\n\nSwagger.py will dynamically build an object model from a Swagger-enabled\nRESTful API.\n\nHere is a simple example using the `Asterisk REST\nInterface `__\n\n.. code:: Python\n\n #!/usr/bin/env python\n\n import json\n\n from swaggerpy.client import SwaggerClient\n from swaggerpy.http_client import SynchronousHttpClient\n\n http_client = SynchronousHttpClient()\n http_client.set_basic_auth('localhost', 'hey', 'peekaboo')\n\n ari = SwaggerClient(\n \"http://localhost:8088/ari/api-docs/resources.json\",\n http_client=http_client)\n\n ws = ari.events.eventWebsocket(app='hello')\n\n for msg_str in iter(lambda: ws.recv(), None):\n msg_json = json.loads(msg_str)\n if msg_json['type'] == 'StasisStart':\n channelId = msg_json['channel']['id']\n ari.channels.answer(channelId=channelId)\n ari.channels.play(channelId=channelId,\n media='sound:hello-world')\n ari.channels.continueInDialplan(channelId=channelId)\n\nswagger-codegen\n===============\n\nThere are the beginnings of a Mustache-based code generator, but it's\nnot functional... yet.\n\n.. Inspired by the original [swagger-codegen][] project, templates are\n written using [Mustache][] templates ([Pystache][], specifically).\n There are several important differences.\n\n * The model that is fed into the mustache templates is almost\n identical to Swagger's API resource listing and API declaration\n model. The differences are listed [below](#model).\n * The templates themselves are completely self contained, with the\n logic to enrich the model being specified in `translate.py` in the\n same directory as the `*.mustache` files.\n\nData model\n==========\n\nThe data model presented by the ``swagger_model`` module is nearly\nidentical to the original Swagger API resource listing and API\ndeclaration. This means that if you add extra custom metadata to your\ndocs (such as a ``_author`` or ``_copyright`` field), they will carry\nforward into the object model. I recommend prefixing custom fields with\nan underscore, to avoid collisions with future versions of Swagger.\n\nThere are a few meaningful differences.\n\n- Resource listing\n- The ``file`` and ``base_dir`` fields have been added, referencing the\n original ``.json`` file.\n- The objects in a ``resource_listing``'s ``api`` array contains a\n field ``api_declaration``, which is the processed result from the\n referenced API doc.\n- API declaration\n- A ``file`` field has been added, referencing the original ``.json``\n file.\n\nDevelopment\n-----------\n\nThe code is documented using `Sphinx `__, which\nallows `IntelliJ IDEA `__\nto do a better job at inferring types for autocompletion.\n\nTo keep things isolated, I also recommend installing (and using)\n`virtualenv `__.\n\n::\n\n $ sudo pip install virtualenv\n $ mkdir -p ~/virtualenv\n $ virtualenv ~/virtualenv/swagger\n $ . ~/virtualenv/swagger/bin/activate\n\n`Setuptools `__ is used for\nbuilding. `Nose `__ is used\nfor unit testing, with the `coverage\n`__ plugin installed to\ngenerated code coverage reports. Pass ``--with-coverage`` to generate\nthe code coverage report. HTML versions of the reports are put in\n``cover/index.html``.\n\n::\n\n $ ./setup.py develop # prep for development (install deps, launchers, etc.)\n $ ./setup.py test # run unit tests\n $ ./setup.py bdist_egg # build distributable\n\n\n\nLicense\n-------\n\nCopyright (c) 2013, Digium, Inc. All rights reserved.\n\nSwagger.py is licensed with a `BSD 3-Clause\nLicense `__.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/digium/swagger-py", "keywords": "", "license": "BSD 3-Clause License", "maintainer": "", "maintainer_email": "", "name": "codet-swaggerpy", "package_url": "https://pypi.org/project/codet-swaggerpy/", "platform": "", "project_url": "https://pypi.org/project/codet-swaggerpy/", "project_urls": { "Homepage": "https://github.com/digium/swagger-py" }, "release_url": "https://pypi.org/project/codet-swaggerpy/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "Library for accessing Swagger-enabled API's", "version": "0.2.1" }, "last_serial": 2473910, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "b951dabf7acc8d22a5a663415c6615fa", "sha256": "0e2660e220059f82d739dbdd38966cca7f91ace65f9e8f8035b2bd880d5f631e" }, "downloads": -1, "filename": "codet_swaggerpy-0.2.1-py3.5.egg", "has_sig": false, "md5_digest": "b951dabf7acc8d22a5a663415c6615fa", "packagetype": "bdist_egg", "python_version": "3.5", "requires_python": null, "size": 29797, "upload_time": "2016-11-21T14:51:14", "url": "https://files.pythonhosted.org/packages/b9/c1/8c1f5d9f4aaa29b9f53ba57b71d73d2ac387134dd89145abc7fb95716dd1/codet_swaggerpy-0.2.1-py3.5.egg" }, { "comment_text": "", "digests": { "md5": "0376c2a1ca955a085ed02295034acd90", "sha256": "547b2a66b1eb82bed13db4e3fb03f77c0bb0f4afbfeff87bf42a97ff322d9e51" }, "downloads": -1, "filename": "codet-swaggerpy-0.2.1.tar.gz", "has_sig": false, "md5_digest": "0376c2a1ca955a085ed02295034acd90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21063, "upload_time": "2016-11-21T14:51:11", "url": "https://files.pythonhosted.org/packages/b8/c3/ede3991ade683c69c4ffe5b5717da637f22679012709817ca5768297e527/codet-swaggerpy-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b951dabf7acc8d22a5a663415c6615fa", "sha256": "0e2660e220059f82d739dbdd38966cca7f91ace65f9e8f8035b2bd880d5f631e" }, "downloads": -1, "filename": "codet_swaggerpy-0.2.1-py3.5.egg", "has_sig": false, "md5_digest": "b951dabf7acc8d22a5a663415c6615fa", "packagetype": "bdist_egg", "python_version": "3.5", "requires_python": null, "size": 29797, "upload_time": "2016-11-21T14:51:14", "url": "https://files.pythonhosted.org/packages/b9/c1/8c1f5d9f4aaa29b9f53ba57b71d73d2ac387134dd89145abc7fb95716dd1/codet_swaggerpy-0.2.1-py3.5.egg" }, { "comment_text": "", "digests": { "md5": "0376c2a1ca955a085ed02295034acd90", "sha256": "547b2a66b1eb82bed13db4e3fb03f77c0bb0f4afbfeff87bf42a97ff322d9e51" }, "downloads": -1, "filename": "codet-swaggerpy-0.2.1.tar.gz", "has_sig": false, "md5_digest": "0376c2a1ca955a085ed02295034acd90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21063, "upload_time": "2016-11-21T14:51:11", "url": "https://files.pythonhosted.org/packages/b8/c3/ede3991ade683c69c4ffe5b5717da637f22679012709817ca5768297e527/codet-swaggerpy-0.2.1.tar.gz" } ] }