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

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-1.0.4.tar.gz (6.6 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-1.0.4-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: py_cozi-1.0.4.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for py_cozi-1.0.4.tar.gz
Algorithm Hash digest
SHA256 a254df3d5b452db32334d043241e8af9ef294687f14a7c428336d369c931fc88
MD5 c7afbcb355e2dbea1d5dc04ca247066a
BLAKE2b-256 b61e105b87af1b928c2262ce4b10070b76c0b77a05cc93e53be7ac5eb2f1052b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: py_cozi-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for py_cozi-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 eee345a37c7607de2a065a7296c8f4cf35d7dc7947a8bcbaed5c2e1c0bdd62a2
MD5 d175cd94bd08bdd1834c6a8b1f595566
BLAKE2b-256 2bccaaca9f5cfa6b675c3f6297577fc6d7385031ee76048699d026cbecfdfd93

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