{ "info": { "author": "Konrad Ja\u0142owiecki ", "author_email": "dexter2206@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "aubergine: create REST APIs using API-first approach.\n==========================================================================\n\n|License: MIT|\n\n**aubergine** is a library that helps you effortlessly create REST API using\nAPI-first approach.\n\nCreating an API in **aubergine** is simple and requires only the following steps:\n\n1. Create your OpenAPI 3 specification file, with ``operationId`` set to the callable of your choice.\n\n.. code:: yaml\n\n openapi: \"3.0.0\"\n servers:\n - url: /v1/rest\n info:\n version: 1.0.0\n title: Hello World\n description: My first api.\n paths:\n /hello:\n get:\n\t operationId: hello_world.hello\n\t parameters:\n\t - who: who\n\t in: query\n\t description: who to great\n\t required: true\n\t schema:\n\t type: string\n\t responses:\n\t '200':\n\t description: Greeting dedicated to given name.\n\t content:\n\t application/json:\n\t\t schema:\n\t\t $ref: '#/components/schemas/Greeting'\n components:\n schemas:\n Greeting:\n\t required:\n\t - message\n\t properties:\n\t message:\n\t type: string\n\n2. Implement operations that you declared in your specification. Place ``hello_world`` module with the following content in an importable directory.\n\n.. code:: python\n\n def hello(who):\n \"\"\"Handles v1/rest/hello\"\"\"\n return {'message': 'Hello {}!'.format(who)}\n\n\n3. Tell aubergine to create an app for you. Create a ``hello_app.py`` with the following contents:\n\n.. code:: python\n\n from aubergine import Aubergine\n\n app = Aubergine.from_file('hello_world.yml')\n api = app.build_api()\n\n4. Your app is ready to go. You can run it with any WSGI server like so:\n\n.. code:: bash\n\n gunicorn hello_app:api\n\n\nTest it by navigating to ``http://localhost:8000/v1/rest/hello?who=World``\n\n.. |License: MIT| image:: https://img.shields.io/badge/License-MIT-yellow.svg\n :target: https://opensource.org/licenses/MIT", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "openapi rest api", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "aubergine", "package_url": "https://pypi.org/project/aubergine/", "platform": "Linux", "project_url": "https://pypi.org/project/aubergine/", "project_urls": null, "release_url": "https://pypi.org/project/aubergine/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "aubergine: create REST APIs using API-first approach.", "version": "0.1.2" }, "last_serial": 3964641, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "4d7089386bd7f28eda0f9bd36ae1fc43", "sha256": "ea9a6dceb85c26da1131c5022dfa98eed07eef9a8e6392af550b6277ba600ce3" }, "downloads": -1, "filename": "aubergine-0.1.2.tar.gz", "has_sig": false, "md5_digest": "4d7089386bd7f28eda0f9bd36ae1fc43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18444, "upload_time": "2018-06-15T12:48:10", "url": "https://files.pythonhosted.org/packages/4e/1b/cf6d7634cd5e642eac96bca4876ee9ad0353035c75620acda148fc2cc826/aubergine-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4d7089386bd7f28eda0f9bd36ae1fc43", "sha256": "ea9a6dceb85c26da1131c5022dfa98eed07eef9a8e6392af550b6277ba600ce3" }, "downloads": -1, "filename": "aubergine-0.1.2.tar.gz", "has_sig": false, "md5_digest": "4d7089386bd7f28eda0f9bd36ae1fc43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18444, "upload_time": "2018-06-15T12:48:10", "url": "https://files.pythonhosted.org/packages/4e/1b/cf6d7634cd5e642eac96bca4876ee9ad0353035c75620acda148fc2cc826/aubergine-0.1.2.tar.gz" } ] }