Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CloudKit API with Python

My iOS app uses CloudKit as it's backend. The app basically collects simple user info (name, company, email phone).

I would like to export all this data from the cloudkit dashboard into a csv file so that I can then upload this data into a different database.

I followed this: https://github.com/lionheart/requests-cloudkit to authenticate my api.

However, I cannot figure out how to query and get the records from my database.

When I execute:

print cloudkit.public.zones.list()

It returns:

{u'zones': [{u'atomic': False, u'zoneID': {u'ownerRecordName': u'_17e6f384d00f4e11aeee6280a48f6724', u'zoneName': u'_defaultZone'}}]}

But, I want it to return all the record of recordtype "Establishment".

Any help is much appreciated!

Thanks!

like image 487
AspiringSoftwareDeveloper Avatar asked Mar 01 '26 01:03

AspiringSoftwareDeveloper


1 Answers

The solution from Alexis Le Baron works for me, but I had to install the requests-cloudkit codebase from git as the one that's committed is an older version.

pip install git+https://github.com/lionheart/requests-cloudkit.git

Someone did mention it in the git issues, but it seems the author hasn't corrected.

like image 131
marisabuzz Avatar answered Mar 05 '26 02:03

marisabuzz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!