Skip to main content

Cozi Unofficial Python Package

Project description

py-cozi

Table of Contents

Introduction

Unofficial python wrapper for the Cozi API. This library requires Python >=3.9.

Installation

pip install py-cozi

Usage

import asyncio
from cozi import Cozi

username = ''
password = ''

cozi = Cozi(username, password)
asyncio.run(cozi.login())

get_lists = asyncio.run(cozi.get_lists())
print(get_lists)

Methods

def login()

Logs into Cozi.


def get_lists()

Gets all of your lists.


def add_list(list_title, list_type)

Adds a new list.

Parameter Type Description
list_title string Title of your list
list_type string 'todo' or 'shopping'

def remove_list(list_id)

Removes a list.

Parameter Type Description
list_id string Cozi list id

def reorder_list(list_id, list_title, items_list, list_type)

Reorders a list.

Parameter Type Description
list_id string Cozi list id
list_title string Title or name of your list
items_list list List of JSON Cozi items
list_type string 'todo' or 'shopping'

def add_item(list_id, item_text, item_pos)

Adds an item to a list.

Parameter Type Description
list_id string Cozi list id
item_text string Title or name of your item
item_pos int Array index position of the item

def edit_item(list_id, item_id, item_text)

Edits an item in a list.

Parameter Type Description
list_id string Cozi list id
item_id string Cozi item id
item_text string Title or name of your item

def mark_item(list_id, item_id, item_status)

Checks or completes and item in a list.

Parameter Type Description
list_id string Cozi list id
item_id string Cozi item id
item_status string 'complete' or 'incomplete'

def remove_items(list_id, items_list)

Removes item(s) from a list.

Parameter Type Description
list_id string Cozi list id
items_list list List of Cozi item IDs

def get_calendar(year, month)

Gets calendar appointments for a given year and month.

Parameter Type Description
year int Year
month int Month

def add_appointment(year, month, day, start, end, date_span, attendees, location, notes, subject)

Adds a new calendar appointment.

Parameter Type Description
year int Year
month int Month
day int Day
start string Start time in 24 hour format 08:00
end string End time in 24 hour format 21:00
date_span int Days the appointment spans
attendees list List of Cozi person IDs
location string Location of the appointment
notes string Notes for the appointment
subject string The title or name of the appointment

def edit_appointment(appt_id, year, month, day, start, end, date_span, attendees, location, notes, subject)

Edits a calendar appointment.

Parameter Type Description
appt_id string Cozi appointment ID
year int Year
month int Month
day int Day
start string Start time in 24 hour format 08:00
end string End time in 24 hour format 21:00
date_span int Days the appointment spans
attendees list List of Cozi person IDs
location string Location of the appointment
notes string Notes for the appointment
subject string The title or name of the appointment

def remove_appointment(year, month, appt_id)

Removes a calendar appointment.

Parameter Type Description
year int Year
month int Month
appt_id string Cozi appointment ID

Exceptions

CoziException


InvalidLoginException

Thrown when login fails.


RequestException

Thrown when the connection is reset.

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

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

py_cozi-2026.4.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file py_cozi-2026.4.0.tar.gz.

File metadata

  • Download URL: py_cozi-2026.4.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for py_cozi-2026.4.0.tar.gz
Algorithm Hash digest
SHA256 6cca41f2e1f9cd5c63afa3701b18b5669b4087a334427a79ed8496ad5658320b
MD5 fdba8f6ff73d707b5fd778989ea14205
BLAKE2b-256 5261bd30ab8ad45fc45470dfe1fc84446167c7cfdfa51f73be0d89350ee60380

See more details on using hashes here.

File details

Details for the file py_cozi-2026.4.0-py3-none-any.whl.

File metadata

  • Download URL: py_cozi-2026.4.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for py_cozi-2026.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c5b2fc1a0a90d618031c6a8c2b7e5734b6ba226296ac3b31dd04fc3e6af5eb41
MD5 a24a47696488bd8f3c959a731bbb8cdc
BLAKE2b-256 7cc4c024b3e70174a44b7fb8f49d66d16c79b5367dda57a840ca609d0caf376a

See more details on using hashes here.

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