This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This project provides an authentication handler for Apple’s CloudKit server-to-server API 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.

pip install requests-cloudkit

Usage

requests-cloudkit provides an authentication handler that can be passed directly to the requests library to authenticate requests 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).

Once you have these values, just plug them into a CloudKitAuth object, which you can use with requests to interface with CloudKit. E.g.:

>>> 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)

Usage Requests-CloudKit with RestMapper

requests-cloudkit can also be used with RestMapper to integrate directly with the CloudKit API.

>>> 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.

>>> 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.

>>> response = cloudkit.public.zones.list()

The above 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.

>>> cloudkit.POST.my.request(data)

For the full list of CloudKit Server-to-Server API capabilities, reference Apple’s developer documentation.

Support

If you like this library, or need help implementing it, just send us an email: hi@lionheartsw.com.

License

Apache License, Version 2.0. See LICENSE for details.

Release History

Release History

0.1.5

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
requests-cloudkit-0.1.5.tar.gz (4.2 kB) Copy SHA256 Checksum SHA256 Source May 28, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting