{ "info": { "author": "lanius", "author_email": "lanius@nirvake.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "hunk\n====\n\nHelps client-side Web development by mocking JSON API server.\n\n\nInstallation\n------------\n\nhunk can be installed via pip or easy_install:\n\n.. code-block:: bash\n\n $ pip install hunk\n\nOr:\n\n.. code-block:: bash\n\n $ easy_install hunk\n\n\nUsage\n-----\n\nSetup data directory and files. \n\n- Directories under the root have a HTTP method name\n- Directories and files have name to be resource path\n- Files have conent to be response JSON\n\nFor example:\n\n.. code-block:: bash\n\n $ tree demo/simple/\n demo/simple/\n |-- get\n | |-- members\n | | |-- 100.json\n | | |-- 200.json\n | | |-- 300.json\n | | ...\n | +-- sounds.json\n |-- post\n | +-- members.json\n ...\n\nMove to the root directory and run hunk:\n\n.. code-block:: bash\n\n $ cd demo/simple/\n $ hunk\n * Running on http://localhost:8080/\n\nNow, you can access Web API with HTTP:\n\n.. code-block:: bash\n\n $ curl http://localhost:8080/members/100\n {\"gender\": \"female\", \"kind\": \"human\", \"name\": \"Dorothy\"}\n\n $ curl http://localhost:8080/members\n [{\"kind\": \"scarecrow\", \"name\": \"Hunk\"}, ...]\n\n $ curl http://localhost:8080/sounds\n [{\"title\": \"Over The Rainbow\"}, ... ]\n\n $ curl http://localhost:8080/members -X POST\n {\"result\": \"success\"}", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lanius/hunk/", "keywords": null, "license": "Copyright (C) 2014 by lanius\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.", "maintainer": null, "maintainer_email": null, "name": "hunk", "package_url": "https://pypi.org/project/hunk/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/hunk/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/lanius/hunk/" }, "release_url": "https://pypi.org/project/hunk/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Mock for JSON API server.", "version": "0.1.0" }, "last_serial": 1003853, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "2f8a4fe0636a378a17a2b7a3d0b56523", "sha256": "d098e0a6ce2bad0bcb5c23bcc70bb5d8d10e8c401434dba3354be80dbfa7d5ab" }, "downloads": -1, "filename": "hunk-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2f8a4fe0636a378a17a2b7a3d0b56523", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8573, "upload_time": "2014-02-18T13:02:06", "url": "https://files.pythonhosted.org/packages/b1/03/ae015d480d14e548231736151355d000640be18e5b05927eaa1daae13ae7/hunk-0.1.0.tar.gz" }, { "comment_text": "", "digests": { "md5": "3e88c33a7127c7caaeacc033d2374f18", "sha256": "701f384da556502b213d808dae93fa5ab9eb8cfdb64335c29aa0d5f1a288053e" }, "downloads": -1, "filename": "hunk-0.1.0.zip", "has_sig": false, "md5_digest": "3e88c33a7127c7caaeacc033d2374f18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18333, "upload_time": "2014-02-18T13:02:09", "url": "https://files.pythonhosted.org/packages/f4/17/77b48274c17ee0202cebd1dda4578dc11319e5ac8ad90c57be32f5bf0d36/hunk-0.1.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2f8a4fe0636a378a17a2b7a3d0b56523", "sha256": "d098e0a6ce2bad0bcb5c23bcc70bb5d8d10e8c401434dba3354be80dbfa7d5ab" }, "downloads": -1, "filename": "hunk-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2f8a4fe0636a378a17a2b7a3d0b56523", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8573, "upload_time": "2014-02-18T13:02:06", "url": "https://files.pythonhosted.org/packages/b1/03/ae015d480d14e548231736151355d000640be18e5b05927eaa1daae13ae7/hunk-0.1.0.tar.gz" }, { "comment_text": "", "digests": { "md5": "3e88c33a7127c7caaeacc033d2374f18", "sha256": "701f384da556502b213d808dae93fa5ab9eb8cfdb64335c29aa0d5f1a288053e" }, "downloads": -1, "filename": "hunk-0.1.0.zip", "has_sig": false, "md5_digest": "3e88c33a7127c7caaeacc033d2374f18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18333, "upload_time": "2014-02-18T13:02:09", "url": "https://files.pythonhosted.org/packages/f4/17/77b48274c17ee0202cebd1dda4578dc11319e5ac8ad90c57be32f5bf0d36/hunk-0.1.0.zip" } ] }