{ "info": { "author": "Isham", "author_email": "eyash.27@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "License :: OSI Approved :: GNU General Public License (GPL)", "Operating System :: Unix", "Topic :: Utilities" ], "description": "##StatesofUSA##\n\nA REST API to return names of the states of U.S.A. This API is built on Flask-restful.\n\n**Follow the steps below to create a REST app on your Linux machine.**\n\nMake sure you have installed python-pip\nFirst create a virtial environment using pip.\n\n $ sudo apt-get install python-virtualenv\n\nCreate an evironment of your own. Use a separate folder where you want to have the virtual setup.\nHere I'm creating a folder _statesofusa_env_ then a _venv_ within.\n\n $ mkdir statesofusa_env\n $ cd statesofusa_env\n $ virtualenv venv\n \n New python executable in venv/bin/python\n Installing distribute............done.\n\nNow enter the virtual environment\n\n $ . venv/bin/activate\n\nOnce this is done, you will be inside the virtual mode. (notice the prompt shows a `venv` environment)\nNow install Flask and Flask-restful\n \n $ pip install Flask\n $ pip install flask-restful\n \nOnce you have done that. All your requirements are ready.\nYou now have to get the **[StatesofUSA](https://github.com/ishammi/StatesofUSA/)** git repository.\n\n $ git clone git@github.com:/StatesofUSA.git\n \nNow to run RESTapi server. Run the _main.py_ file\n\n $ cd statesofusa/\n $ python main.py\n * Running on http://127.0.0.1:5000/\n * Restarting with reloader\n\nCongratulations.. Your Flask REST server is up and running in the local machine on port 5000.\nHowever the API is routed to the URL `http://127.0.0.1:5000/states/`\nFor convinience, we have hard coded few authorization parameters. Use the token '38c50d14-436b-4e3e-b447-e2e9334fea1a' to hit the API from outside the virtual environment. Here's an example\n\n $ curl -H \"Authorization: token 38c50d14-436b-4e3e-b447-e2e9334fea1a\" --data \"page=1&items_per_page=10\" http://127.0.0.1:5000/states/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": "states usa america", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "StatesofUSA", "package_url": "https://pypi.org/project/StatesofUSA/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/StatesofUSA/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/StatesofUSA/0.1/", "requires_dist": null, "requires_python": null, "summary": "An API built on Flask-RESTful that returns with the names of all the states in USA.", "version": "0.1" }, "last_serial": 2029677, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "001489ef673b93398a98d7bbe00d5166", "sha256": "d194b3388775a30e808e8fe222f3066b7d4ca9a63d7575ba6582c88aedbedf6e" }, "downloads": -1, "filename": "StatesofUSA-0.1-py2.7.egg", "has_sig": false, "md5_digest": "001489ef673b93398a98d7bbe00d5166", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 14527, "upload_time": "2016-03-27T11:57:59", "url": "https://files.pythonhosted.org/packages/50/52/a810367b9e75b4a4333cee1beaf3e7d336226af268bd68c4e1b504c31a02/StatesofUSA-0.1-py2.7.egg" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "001489ef673b93398a98d7bbe00d5166", "sha256": "d194b3388775a30e808e8fe222f3066b7d4ca9a63d7575ba6582c88aedbedf6e" }, "downloads": -1, "filename": "StatesofUSA-0.1-py2.7.egg", "has_sig": false, "md5_digest": "001489ef673b93398a98d7bbe00d5166", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 14527, "upload_time": "2016-03-27T11:57:59", "url": "https://files.pythonhosted.org/packages/50/52/a810367b9e75b4a4333cee1beaf3e7d336226af268bd68c4e1b504c31a02/StatesofUSA-0.1-py2.7.egg" } ] }