{ "info": { "author": "Dan Loewenherz", "author_email": "dan@lionheartsw.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "|image0| |image1|\n\n|CI Status| |Version|\n\nThis project provides an authentication handler for Apple\u2019s CloudKit\nserver-to-server API for the requests Python library. In English, this\nmeans that this library lets you interact with CloudKit with Python in a\nserver environment. It just has two\ndependencies\u2013\\ `requests `__\nand python-ecdsa\u2013and lets you skip all of the dull and boring\ncryptographic signing steps when authenticating with CloudKit on your\nown. While the underlying code is pretty straightforward, there was no\ncorrect code sample available online that described how to do this\u2013but\nnow there is!\n\nInstallation\n------------\n\nrequests-cloudkit is available for download through the Python Package\nIndex (PyPi). You can install it right away using pip or easy_install.\n\n.. code:: bash\n\n pip install requests-cloudkit\n\nUsage\n-----\n\nrequests-cloudkit provides an authentication handler that can be passed\ndirectly to the requests library to authenticate requests to the\nCloudKit API. Before working with the CloudKit server-to-server API,\nyou\u2019ll first need to follow Apple\u2019s instructions to generate a\ncertificate and a server-to-server key (see `Accessing CloudKit Using a\nServer-to-Server\nKey `__).\n\nOnce you have these values, just plug them into a CloudKitAuth object,\nwhich you can use with requests to interface with CloudKit. E.g.:\n\n.. code:: pycon\n\n >>> import requests\n >>> from requests_cloudkit import CloudKitAuth\n >>> auth = CloudKitAuth(key_id=YOUR_KEY_ID, key_file_name=YOUR_PRIVATE_KEY_PATH)\n >>> requests.get(\"https://api.apple-cloudkit.com/database/[version]/[container]/[environment]/public/zones/list\", auth=auth)\n\nUsing Requests-CloudKit with RestMapper\n---------------------------------------\n\nrequests-cloudkit can also be used with\n`python-restmapper `__\nto integrate directly with the CloudKit API.\n\n.. code:: pycon\n\n >>> CloudKit = restmapper.RestMapper(\"https://api.apple-cloudkit.com/database/[version]/[container]/[environment]/\")\n\nInstantiate a cloudkit instance using your CloudKit server-to-server key\nID and provide the path to the private key file.\n\n.. code:: pycon\n\n >>> cloudkit = CloudKit(auth=CloudKitAuth(key_id=YOUR_KEY_ID, key_file_name=YOUR_KEY_FILE))\n\nNow, you can start making requests to the CloudKit API using a nice\nattribute syntax.\n\n.. code:: pycon\n\n >>> response = cloudkit.public.zones.list()\n\nThe above will hit\nhttps://api.apple-cloudkit.com/database/[version]/[container]/[environment]/public/zones/list.\n\nIf you want to pass in body data for a POST, provide a single argument\nto the call to the API, and specify \u201cPOST\u201d as the first attribute (note:\nthis argument expects a *str* value, so if you want to pass JSON, use\n``json.dumps`` to encode it into a string). I.e.\n\n.. code:: pycon\n\n >>> cloudkit.POST.my.request(data)\n\nOr:\n\n.. code:: pycon\n\n >>> cloudkit.POST.my.request(json.dumps(json_payload))\n\nFor the full list of CloudKit Server-to-Server API capabilities,\nreference `Apple\u2019s developer\ndocumentation `__.\n\nSupport\n-------\n\nIf you like this library, or need help implementing it, just send us an\nemail: hi@lionheartsw.com.\n\n.. _license-licenselicense-imagelicense-url:\n\nLicense |License|\n-----------------\n\nApache License, Version 2.0. See `LICENSE `__ for details.\n\n.. raw:: html\n\n \n\n.. |image0| image:: meta/repo-banner.png\n.. |image1| image:: meta/repo-banner-bottom.png\n :target: https://github.com/lionheart/requests-cloudkit/blob/master/https://lionheartsw.com/\n.. |CI Status| image:: https://img.shields.io/travis/lionheart/requests-cloudkit.svg?style=flat\n :target: https://github.com/lionheart/requests-cloudkit/blob/master/https://travis-ci.org/lionheart/requests-cloudkit.py\n.. |Version| image:: https://img.shields.io/pypi/v/requests-cloudkit.svg?style=flat\n :target: https://github.com/lionheart/requests-cloudkit/blob/master/https://pypi.python.org/pypi/requests-cloudkit\n.. |License| image:: http://img.shields.io/pypi/l/requests-cloudkit.svg?style=flat\n :target: https://github.com/lionheart/requests-cloudkit/blob/master/LICENSE\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lionheart/requests-cloudkit", "keywords": "requests cloudkit", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "requests-cloudkit", "package_url": "https://pypi.org/project/requests-cloudkit/", "platform": "", "project_url": "https://pypi.org/project/requests-cloudkit/", "project_urls": { "Homepage": "https://github.com/lionheart/requests-cloudkit" }, "release_url": "https://pypi.org/project/requests-cloudkit/1.0.1/", "requires_dist": [ "requests (>=2.0.0)", "ecdsa (>=0.13)", "requests (>=2.0.0); extra == 'restmapper'", "ecdsa (>=0.13); extra == 'restmapper'", "restmapper (>=0.1.0); extra == 'restmapper'" ], "requires_python": "", "summary": "Apple CloudKit server-to-server support for the requests Python library.", "version": "1.0.1" }, "last_serial": 3811494, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "2e0b31c3378d2bf35cb2e1151ba3b2a8", "sha256": "98ee5d99622601fab6f91f7be4ac8e903367e6062fb8e935438677195d79486c" }, "downloads": -1, "filename": "requests-cloudkit-0.1.0.tar.gz", "has_sig": true, "md5_digest": "2e0b31c3378d2bf35cb2e1151ba3b2a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4004, "upload_time": "2016-05-25T16:12:35", "url": "https://files.pythonhosted.org/packages/a4/ba/96a2227a669920ff776949728d1f4c83fdf232492966c342c5c69c428d85/requests-cloudkit-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "19f2cfa30d8c3322ea7cda02766b1935", "sha256": "861f2a7f9f0658b3e028e585e7a16b6c0fa0c33d1563af2d1889e9aa51e717f7" }, "downloads": -1, "filename": "requests-cloudkit-0.1.1.tar.gz", "has_sig": true, "md5_digest": "19f2cfa30d8c3322ea7cda02766b1935", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3996, "upload_time": "2016-05-25T16:13:50", "url": "https://files.pythonhosted.org/packages/fd/d1/d0cf737f1cb8cb525cea8fb9549b95234947ad648097f630bf9bb069c21b/requests-cloudkit-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "5137fcccd27dff1fb88c70dd4a2cbcd1", "sha256": "5983704b38f27b36971f93b8a1335d424cc57555f8fabb08316d1723f4a284f3" }, "downloads": -1, "filename": "requests-cloudkit-0.1.2.tar.gz", "has_sig": true, "md5_digest": "5137fcccd27dff1fb88c70dd4a2cbcd1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4076, "upload_time": "2016-05-25T16:17:00", "url": "https://files.pythonhosted.org/packages/fc/86/ef5ce495808d1c2c498a1de43dd67fb70797968bdb07ca1c7f319e142add/requests-cloudkit-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "6ee85257e8c484821169767e0791ad5e", "sha256": "8bc3ef6209b423225ad87dd8e372035deea582ec3358580960c7f350a5fde80c" }, "downloads": -1, "filename": "requests-cloudkit-0.1.3.tar.gz", "has_sig": true, "md5_digest": "6ee85257e8c484821169767e0791ad5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4094, "upload_time": "2016-05-28T15:00:00", "url": "https://files.pythonhosted.org/packages/de/32/8715b68c0aa74eeece1eb28b6d21536c9a3de52e63e9e8eb088b14f953e3/requests-cloudkit-0.1.3.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "3517a2fbf7b26114108fb75bc68adace", "sha256": "b3c731335248c81850da3d3b89c591141b888543f10138cc04e28bf9c866fce8" }, "downloads": -1, "filename": "requests-cloudkit-0.1.5.tar.gz", "has_sig": true, "md5_digest": "3517a2fbf7b26114108fb75bc68adace", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4162, "upload_time": "2016-05-28T15:13:32", "url": "https://files.pythonhosted.org/packages/43/5a/99fd1d6e573c94615bd32176504ee589037c3f118bdba94729eed356ccbc/requests-cloudkit-0.1.5.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "ec550a26bed624b75ea178b7fd5c354c", "sha256": "b92d13064844cfe7d472acdf0e46000815efdfe033e6dcbf52c344955cbd139e" }, "downloads": -1, "filename": "requests-cloudkit-1.0.0.tar.gz", "has_sig": true, "md5_digest": "ec550a26bed624b75ea178b7fd5c354c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4779, "upload_time": "2017-10-17T14:20:12", "url": "https://files.pythonhosted.org/packages/f4/1f/49f0b35325cdf0dab07171f0b65c60b9fecf9623cbf48f296e1fe3050398/requests-cloudkit-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "abbfdb97b467ef00815619917cd978bd", "sha256": "15dd1158cfff24299eda106a2fe3dbac218ac8abc0cf5797fb8ab8469387a2b7" }, "downloads": -1, "filename": "requests_cloudkit-1.0.1-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "abbfdb97b467ef00815619917cd978bd", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8591, "upload_time": "2018-04-26T18:48:12", "url": "https://files.pythonhosted.org/packages/e3/e4/9d795ed267c4dd8f7ddb8551e6ef56f35a8904b4c4bfd1861d6a4b807143/requests_cloudkit-1.0.1-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "abbfdb97b467ef00815619917cd978bd", "sha256": "15dd1158cfff24299eda106a2fe3dbac218ac8abc0cf5797fb8ab8469387a2b7" }, "downloads": -1, "filename": "requests_cloudkit-1.0.1-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "abbfdb97b467ef00815619917cd978bd", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8591, "upload_time": "2018-04-26T18:48:12", "url": "https://files.pythonhosted.org/packages/e3/e4/9d795ed267c4dd8f7ddb8551e6ef56f35a8904b4c4bfd1861d6a4b807143/requests_cloudkit-1.0.1-py2.py3-none-any.whl" } ] }