{ "info": { "author": "Carles Sala", "author_email": "carles@pythiac.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "[![PyPi][pypi-img]][pypi-url]\n[![TravisCI][travis-img]][travis-url]\n[![CodeCov][codecov-img]][codecov-url]\n\n[travis-img]: https://travis-ci.org/smapy/smapy.svg?branch=master\n[travis-url]: https://travis-ci.org/smapy/smapy\n[pypi-img]: https://img.shields.io/pypi/v/smapy.svg\n[pypi-url]: https://pypi.python.org/pypi/smapy\n[codecov-img]: https://codecov.io/gh/smapy/smapy/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/smapy/smapy\n\n# Smapy\n\nSimple Modular APIs written in Python.\n\n- Free software: MIT license\n- Documentation: https://smapy.github.io/smapy\n\n## Overview\n\n**Smapy** is a framework built on top of [Falcon](https://falconframework.org) and\n[gunicorn](https://gunicorn.org/), which allows building modular, distributed and\nasynchronous-capable service oriented Web APIs writing as little Python code as possible.\n\n## Installation\n\nThe simplest and recommended way to install **Smapy** is using `pip`:\n\n```bash\npip install smapy\n```\n\nAlternatively, clone the repository and install it from source running the `make install` command.\n\n```bash\ngit clone git@github.com:smapy/smapy.git\ncd smapy\nmake install\n```\n\nFor development, you can use the `make install-develop` command instead in order to install all\nthe required dependencies for testing and code linting.\n\n## Getting Started\n\nAll you need to start a **Smapy** application is to execute the `smapy` command line utility:\n\n```bash\n$ smapy\n[2018-12-29 21:53:03 +0100] [25213] [INFO] Starting gunicorn 19.9.0\n[2018-12-29 21:53:03 +0100] [25213] [INFO] Listening at: http://127.0.0.1:8001 (25213)\n[2018-12-29 21:53:03 +0100] [25213] [INFO] Using worker: gevent\n[2018-12-29 21:53:03 +0100] [25216] [INFO] Booting worker with pid: 25216\n2018-12-29 21:53:03,304 - 25216 - INFO - None - application - Initializing the API\n2018-12-29 21:53:03,307 - 25216 - INFO - None - api - Adding new runnable hello.World\n2018-12-29 21:53:03,307 - 25216 - INFO - None - api - Adding new runnable misc.MultiProcess\n2018-12-29 21:53:03,307 - 25216 - INFO - None - api - Adding new runnable misc.Report\n2018-12-29 21:53:03,308 - 25216 - INFO - None - api - Adding new runnable misc.HelloWorld\n```\n\nAfter that, you can start playing with it through HTTP requests:\n\n```\n$ curl localhost:8001/hello\n{\n \"elapsed\": 0.08,\n \"host\": \"hostname\",\n \"in_ts\": \"2018-05-06T20:37:48.671867\",\n \"out_ts\": \"2018-05-06T20:37:48.671947\",\n \"pid\": 31789,\n \"results\": null,\n \"session\": null,\n \"status\": \"404 Not Found\"\n}\n\n$ curl localhost:8001/hello_world\n{\n \"elapsed\": 12.044,\n \"host\": \"hostname\",\n \"in_ts\": \"2018-05-06T20:37:58.759039\",\n \"out_ts\": \"2018-05-06T20:37:58.771083\",\n \"pid\": 31789,\n \"results\": null,\n \"session\": \"5aef67a6ab17857c2d81a6ea\",\n \"status\": \"200 OK\"\n}\n\n$ curl localhost:8001/hello_world?sync=True\n{\n \"elapsed\": 26.668,\n \"host\": \"hostname\",\n \"in_ts\": \"2018-05-06T20:38:03.903315\",\n \"out_ts\": \"2018-05-06T20:38:03.929983\",\n \"pid\": 31789,\n \"results\": {\n \"hello\": \"world!\",\n \"sync\": \"True\"\n },\n \"session\": \"5aef67abab17857c2d81a6ec\",\n \"status\": \"200 OK\"\n}\n\n$ curl localhost:8001/report?session=5aef67a6ab17857c2d81a6ea\n{\n \"elapsed\": 19.758,\n \"host\": \"hostname\",\n \"in_ts\": \"2018-05-06T20:39:49.670267\",\n \"out_ts\": \"2018-05-06T20:39:49.690025\",\n \"pid\": 31789,\n \"results\": {\n \"actions\": {\n \"OK\": 1\n },\n \"last_activity\": \"2018-05-06T20:37:58.812000\",\n \"session\": {\n \"_id\": \"5aef67a6ab17857c2d81a6ea\",\n \"alive\": false,\n \"body\": {},\n \"elapsed\": \"0:00:00.058000\",\n \"env\": {\n \"HTTP_ACCEPT\": \"*/*\",\n \"HTTP_HOST\": \"localhost:8001\",\n \"HTTP_USER_AGENT\": \"curl/7.47.0\",\n \"PATH_INFO\": \"/hello_world\",\n \"QUERY_STRING\": \"\",\n \"RAW_URI\": \"/hello_world\",\n \"REMOTE_ADDR\": \"127.0.0.1\",\n \"REMOTE_PORT\": \"50636\",\n \"REQUEST_METHOD\": \"GET\",\n \"SCRIPT_NAME\": \"\",\n \"SERVER_NAME\": \"127.0.0.1\",\n \"SERVER_PORT\": \"8001\",\n \"SERVER_PROTOCOL\": \"HTTP/1.1\",\n \"SERVER_SOFTWARE\": \"gunicorn/19.8.1\"\n },\n \"host\": \"hostname\",\n \"in_ts\": \"2018-05-06T20:37:58.759000\",\n \"out_ts\": \"2018-05-06T20:37:58.817000\",\n \"params\": {},\n \"pid\": 31789,\n \"resource\": \"misc.HelloWorld\",\n \"response\": {\n \"hello\": \"world!\"\n },\n \"status\": \"OK\",\n \"sync\": false\n },\n \"session_data\": {\n \"links\": 0,\n \"occurrences\": 0,\n \"post\": 0\n }\n },\n \"session\": \"5aef6815ab17857c2d81a6ef\",\n \"status\": \"200 OK\"\n}\n```\n\n\n# History\n\n## 0.0.2\n\n* Add `smapy` CLI\n* Add default actions ands resources\n* Import actions dynamically\n* Update project structure\n\n## 0.0.1\n\n* First release on PyPI.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/csala/smapy", "keywords": "api", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "smapy", "package_url": "https://pypi.org/project/smapy/", "platform": "", "project_url": "https://pypi.org/project/smapy/", "project_urls": { "Homepage": "https://github.com/csala/smapy" }, "release_url": "https://pypi.org/project/smapy/0.0.2/", "requires_dist": [ "concurrent-log-handler (>=0.9.12)", "falcon (<2,>=1.4.1)", "gevent (>==1.2.2)", "gunicorn (>=19.8.1)", "pymongo (>=3.6.1)", "requests (>=2.19.1)", "pytest (>=3.4.2) ; extra == 'dev'", "pytest-cov (>=2.6.0) ; extra == 'dev'", "bumpversion (>=0.5.3) ; extra == 'dev'", "pip (>=9.0.1) ; extra == 'dev'", "watchdog (>=0.8.3) ; extra == 'dev'", "m2r (>=0.2.0) ; extra == 'dev'", "Sphinx (>=1.7.1) ; extra == 'dev'", "sphinx-rtd-theme (>=0.2.4) ; extra == 'dev'", "flake8 (>=3.5.0) ; extra == 'dev'", "isort (>=4.3.4) ; extra == 'dev'", "autoflake (>=1.2) ; extra == 'dev'", "autopep8 (>=1.3.5) ; extra == 'dev'", "twine (>=1.10.0) ; extra == 'dev'", "wheel (>=0.30.0) ; extra == 'dev'", "tox (>=2.9.1) ; extra == 'dev'", "coverage (>=4.5.1) ; extra == 'dev'", "pytest (>=3.4.2) ; extra == 'test'", "pytest-cov (>=2.6.0) ; extra == 'test'" ], "requires_python": ">=3.4", "summary": "Simple Modular API written in Python.", "version": "0.0.2" }, "last_serial": 5692515, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "5b88bde2ba7b5ab0cda911cc6ad31cad", "sha256": "a414666eb8b681fdb0d6a21cbbbc9f6c5b88f1a36bceec025d952323d6c0e547" }, "downloads": -1, "filename": "smapy-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5b88bde2ba7b5ab0cda911cc6ad31cad", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13342, "upload_time": "2018-06-21T05:45:42", "url": "https://files.pythonhosted.org/packages/1a/65/59b28ec2dabe0c88a249bed2d5fbb12397ecc4512dee10cdbc0b33267e70/smapy-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "76af861edb62c3693b9dfed25044427c", "sha256": "beff55d3aa73f6a7e058f3f0b177a23b27e095ea1e8cc5271278fed7b00df96a" }, "downloads": -1, "filename": "smapy-0.0.1.tar.gz", "has_sig": false, "md5_digest": "76af861edb62c3693b9dfed25044427c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24548, "upload_time": "2018-06-21T05:45:43", "url": "https://files.pythonhosted.org/packages/f5/68/252216bf9c3af427e7822c052b88dcd0ae713f8704ae5c043efaa0b6ad29/smapy-0.0.1.tar.gz" } ], "0.0.1.dev0": [ { "comment_text": "", "digests": { "md5": "400821903f3fde3b8e2cc82175af3257", "sha256": "99c77078fafcf94a692e76a5bed6031ed2a5ff549b1fc8b3869a31906d1875ec" }, "downloads": -1, "filename": "smapy-0.0.1.dev0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "400821903f3fde3b8e2cc82175af3257", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13842, "upload_time": "2018-06-21T05:31:08", "url": "https://files.pythonhosted.org/packages/36/72/def98f5f5bcd1276c418cc8b1fd8a8fed065d7a4e9bb35c52e6838ce3177/smapy-0.0.1.dev0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3d6b71b697ce147e21e736b9ae05a32b", "sha256": "6ff18c0ac941c7aa48b3f0eb45dda8519ea5ba84408d6825bc8fc2694b99bd1c" }, "downloads": -1, "filename": "smapy-0.0.1.dev0.tar.gz", "has_sig": false, "md5_digest": "3d6b71b697ce147e21e736b9ae05a32b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24781, "upload_time": "2018-06-21T05:31:10", "url": "https://files.pythonhosted.org/packages/08/d4/cd00a0e3af56fcf85b1a27a95004d5563fcfcd35740b1d7dc704c51a9067/smapy-0.0.1.dev0.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "0a4e3b79c983d58bc389186bf0dda126", "sha256": "a27c332847a21b8371f72fae948ae662823962be19b4c413bbfc3430a71694ff" }, "downloads": -1, "filename": "smapy-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0a4e3b79c983d58bc389186bf0dda126", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.4", "size": 18414, "upload_time": "2019-08-17T18:47:45", "url": "https://files.pythonhosted.org/packages/75/4b/18d017daf6b5ad1b001c50d8d8bf45fc4b9f6cb94026b8a9e7a7e3e0f71f/smapy-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "da59705f090fcf603c661d59d9441d45", "sha256": "8e66cde5428330a1208147afc58247b745710ddce3edc13c7f806a99469ae307" }, "downloads": -1, "filename": "smapy-0.0.2.tar.gz", "has_sig": false, "md5_digest": "da59705f090fcf603c661d59d9441d45", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 33192, "upload_time": "2019-08-17T18:47:48", "url": "https://files.pythonhosted.org/packages/a6/3b/1b9d150241c5a38f256aa6c2bfc17c18e2447750586c12b51ea711cb3158/smapy-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0a4e3b79c983d58bc389186bf0dda126", "sha256": "a27c332847a21b8371f72fae948ae662823962be19b4c413bbfc3430a71694ff" }, "downloads": -1, "filename": "smapy-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0a4e3b79c983d58bc389186bf0dda126", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.4", "size": 18414, "upload_time": "2019-08-17T18:47:45", "url": "https://files.pythonhosted.org/packages/75/4b/18d017daf6b5ad1b001c50d8d8bf45fc4b9f6cb94026b8a9e7a7e3e0f71f/smapy-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "da59705f090fcf603c661d59d9441d45", "sha256": "8e66cde5428330a1208147afc58247b745710ddce3edc13c7f806a99469ae307" }, "downloads": -1, "filename": "smapy-0.0.2.tar.gz", "has_sig": false, "md5_digest": "da59705f090fcf603c661d59d9441d45", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 33192, "upload_time": "2019-08-17T18:47:48", "url": "https://files.pythonhosted.org/packages/a6/3b/1b9d150241c5a38f256aa6c2bfc17c18e2447750586c12b51ea711cb3158/smapy-0.0.2.tar.gz" } ] }