Skip to main content

SimpleiCloud is a lightweight iCloud client for Python, currently focused exclusively on managing contacts.

Project description

SimpleICloud

SimpleiCloud is a lightweight iCloud client for Python, currently focused exclusively on managing contacts.

Unlike other libraries — such as the excellent PyiCloud — SimpleiCloud aims to support a broader set of contact-related use cases, including creating, updating, and deleting contacts.

SimpleiCloud is powered by requests HTTP library.

This module is under active development, and we welcome contributions from the community.

Examples

You must use an app-specific password for iCloud (generate it at https://appleid.apple.com/ > Sign-In & Security > App-Specific Passwords)

Package Installation

pip install simple-icloud

Class Instantiating

from simple_icloud import SimpleICloudService

simpleicloudservice = SimpleICloudService(
    username="user@domain.com",
    password="secret_P422sword,
)

Get a contact

contact = simpleicloudservice.get_contact("F4ZZZZ0-EZZ7-4ZZD-8ZZE-C4FZZZZZZACD")

Get all contacts

contacts_list = simpleicloudservice.get_all_contacts()

Delete a contact

contact = simpleicloudservice.delete_contact("F4ZZZZ0-EZZ7-4ZZD-8ZZE-C4FZZZZZZACD")

Create a contact

create the vCard

import uuid
import vobject
v = vobject.vCard()
v.add("fn").value = "Pippo DePippis"
# don't ask me why but iCloud need the following!
# credits to https://github.com/pimutils/vdirsyncer/issues/1145#issuecomment-2464999129
v.add("n").value = vobject.vcard.Name(family="DePippis", given="Pippo")
phone = v.add("tel")
phone.value = phone_
phone.type_param = "CELL"
email = v.add("email")
email.value = "pippo.depippis@xyz.abc
email.type_param = ["INTERNET", "HOME", "pref"]
uuid_ = str(uuid.uuid4())
v.add("uid").value = uuid_

create the contact in iCloud

simpleicloudservice.create_contact(vcard=vv)

Update a contact

edit the contact's feature

email = v.add("email")
email.value = "blabla@aaa.com"
email.type_param = ["INTERNET", "HOME", "pref"]

update the contact in iCloud

simpleicloudservice.update_contact(v)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simple_icloud-0.1.2.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simple_icloud-0.1.2-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file simple_icloud-0.1.2.tar.gz.

File metadata

  • Download URL: simple_icloud-0.1.2.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for simple_icloud-0.1.2.tar.gz
Algorithm Hash digest
SHA256 585f9f9aeeb569538930c312d1a8e57c499a6b66f7d61bc61458cfba9768f7cc
MD5 287eeadc6ab5c095b098b5d1c3c9f410
BLAKE2b-256 6f310092aca567241b0bdaa96016886edc3cf1a5e1fcb9956b393947c6fb5b1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for simple_icloud-0.1.2.tar.gz:

Publisher: publish.yml on luca-ferreri/simple-icloud

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simple_icloud-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: simple_icloud-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for simple_icloud-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a7b0b0e5ce728791fc57cc6efc2b9bf048bdaff27b5a9d65efec5169baf423b5
MD5 6ebf5b9d3a6ed25889438132be3b0770
BLAKE2b-256 e8634f2d88cafa5f6d6e18d55f0648d80e7ae60b8322c00703c24633d54bf693

See more details on using hashes here.

Provenance

The following attestation bundles were made for simple_icloud-0.1.2-py3-none-any.whl:

Publisher: publish.yml on luca-ferreri/simple-icloud

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page