Metadata-Version: 1.1
Name: requests-cloudkit
Version: 0.1.3
Summary: Apple CloudKit server-to-server support for the requests Python library.
Home-page: https://github.com/lionheart/requests-cloudkit
Author: Dan Loewenherz
Author-email: dan@lionheartsw.com
License: Apache 2.0
Description: Requests-CloudKit |ci| |downloads| |version|
        ============================================
        
        This project provides Apple CloudKit server-to-server support for the requests Python library.
        
        Installation
        ------------
        
        requests-cloudkit is available for download through the Python Package Index (PyPi). You can install it right away using pip or easy_install.
        
        .. code:: bash
        
           pip install requests-cloudkit
        
        Usage
        -----
        
        requests-cloudkit provides an authentication object that can be passed directly to requests to authenticate calls to the CloudKit API. Before working with the CloudKit server-to-server API, you'll first need to follow Apple's instructions to generate a certificate and a server-to-server key (see `Accessing CloudKit Using a Server-to-Server Key <https://developer.apple.com/library/ios/documentation/DataManagement/Conceptual/CloutKitWebServicesReference/SettingUpWebServices/SettingUpWebServices.html#//apple_ref/doc/uid/TP40015240-CH24-SW6>`_).
        
        Once you have these values, just plug them into a CloudKitAuth object, which you can use with requests interface with CloudKit. E.g.:
        
        .. code:: pycon
        
           >>> import requests
           >>> from requests_cloudkit import CloudKitAuth
           >>> auth = CloudKitAuth(key_id=YOUR_KEY_ID, key_file_name=YOUR_PRIVATE_KEY_PATH)
           >>> requests.get("https://api.apple-cloudkit.com/database/[version]/[container]/[environment]/public/zones/list", auth=auth)
        
        requests-cloudkit can also be used with `RestMapper <https://github.com/lionheart/python-restmapper>`_ to integrate directly with the CloudKit API.
        
        .. code:: pycon
        
           >>> CloudKit = restmapper.RestMapper("https://api.apple-cloudkit.com/database/[version]/[container]/[environment]/")
        
        Instantiate a cloudkit instance using your CloudKit server-to-server key ID and provide the path to the private key file.
        
        .. code:: pycon
        
           >>> cloudkit = CloudKit(auth=CloudKitAuth(key_id=YOUR_KEY_ID, key_file_name=YOUR_KEY_FILE))
        
        Now, you can start making requests to the CloudKit API using a nice attribute syntax.
        
        .. code:: pycon
        
           >>> response = cloudkit.public.zones.list()
        
        ...will hit https://api.apple-cloudkit.com/database/[version]/[container]/[environment]/public/zones/list.
        
        If you want to pass in body data for a POST, provide a single argument to the call to the API, and specify "POST" as the first attribute. I.e.
        
        .. code:: pycon
        
           >>> cloudkit.POST.my.request(data)
        
        For the full list of CloudKit Server-to-Server API capabilities, reference `Apple's developer documentation <https://developer.apple.com/library/ios/documentation/DataManagement/Conceptual/CloutKitWebServicesReference/Introduction/Introduction.html#//apple_ref/doc/uid/TP40015240-CH1-SW1>`_.
        
        Support
        -------
        
        If you like this library, or need help implementing it, send us an email: hi@lionheartsw.com.
        
        License
        -------
        
        .. image:: http://img.shields.io/pypi/l/requests-cloudkit.svg?style=flat
           :target: https://github.com/lionheart/requests-cloudkit/blob/master/LICENSE
        
        Apache License, Version 2.0. See `LICENSE <https://github.com/lionheart/requests-cloudkit/blob/master/LICENSE>`_ for details.
        
        .. |ci| image:: https://img.shields.io/travis/lionheart/requests-cloudkit.svg?style=flat
        .. _ci: https://travis-ci.org/lionheart/requests-cloudkit.py
        
        .. |downloads| image:: https://img.shields.io/pypi/dm/requests-cloudkit.svg?style=flat
        .. _downloads: https://pypi.python.org/pypi/requests-cloudkit
        
        .. |version| image:: https://img.shields.io/pypi/v/requests-cloudkit.svg?style=flat
        .. _version: https://pypi.python.org/pypi/requests-cloudkit
        
Keywords: requests cloudkit
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries
Classifier: Topic :: Utilities
Classifier: License :: OSI Approved :: Apache Software License
