{ "info": { "author": "Josh Rowe", "author_email": "josh@s-block.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "python-api-client\n=========================\n\nPython client to connect to REST based api\n\n\nThis is still in its early stages and needs more tests and functionality for PUT, POST, PATCH and DELETE methods\n\n\nTo run the tests\n----------------\n\npip install -r test_requirements.txt\n\npython tests.py\n\n\nUsage\n-----\n\nIf you are using Django put the following in to your settings file:\n\n```python\nBASE_API_URL = \"http://yourdomain.com/api/v2/\"\n```\n\nIf you are not using Django create a file called settings.py in your project and add the line to that.\n\n\nModels:\n```python\nfrom python_api_client.models import Model\n\n\nclass MyModel(Model):\n \"\"\"\n This assumes a url of http://yourdomain.com/api/v2/mymodels/...\n if this is not the case you can override\n\n @classmethod\n def url(cls):\n return 'whatever url you want'\n\n \"\"\"\n pass\n```\n\nViews:\n```python\nfrom .models import MyModel\n\n\nmy_models = MyModel.objects.all()\n\nsome_of_my_models = MyModel.objects.filter(something='s)\n\nmy_model = MyModel.objects.get(pk=2)\nmy_model.field = 'changed'\nmy_model.save()\n\n```", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": "python REST api client", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "python_api_client", "package_url": "https://pypi.org/project/python_api_client/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/python_api_client/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/python_api_client/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "Python client for REST api.", "version": "0.0.1" }, "last_serial": 1432375, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "841ab70932d6652275639fad51f74ae4", "sha256": "5268b25b1e0bb3e0757f363eb687985ffceaa491255bba45657437f2beba049d" }, "downloads": -1, "filename": "python_api_client-0.0.1.tar.gz", "has_sig": false, "md5_digest": "841ab70932d6652275639fad51f74ae4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6541, "upload_time": "2015-02-21T16:12:48", "url": "https://files.pythonhosted.org/packages/4a/a4/bc63c01fdb1b753e46dd06ca79a5f9d53ba0a019528c7a5fa37c2683cf06/python_api_client-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "841ab70932d6652275639fad51f74ae4", "sha256": "5268b25b1e0bb3e0757f363eb687985ffceaa491255bba45657437f2beba049d" }, "downloads": -1, "filename": "python_api_client-0.0.1.tar.gz", "has_sig": false, "md5_digest": "841ab70932d6652275639fad51f74ae4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6541, "upload_time": "2015-02-21T16:12:48", "url": "https://files.pythonhosted.org/packages/4a/a4/bc63c01fdb1b753e46dd06ca79a5f9d53ba0a019528c7a5fa37c2683cf06/python_api_client-0.0.1.tar.gz" } ] }