Skip to main content

Python library for interacting with the monday.com API. Respects monday.com API rate limits and query complexity limits.

Project description

Monday.com API Client

This Python library provides an asynchronous client to interact with the Monday.com API.

Key Features

  • Asynchronous API calls using asyncio and aiohttp for efficient I/O operations.
  • Automatic handling of API rate limits and query limits following Monday.com's rate limit policies.
  • Built-in retry logic for handling rate limit exceptions, ensuring smooth operation without manual intervention.
  • Easy-to-use methods for common Monday.com operations.
  • Fully customizable requests with all Monday.com method arguments and fields available to the user.

Installation

pip install monday-client

Quick Start

import asyncio

from monday import MondayClient

async def main():
    client = MondayClient(api_key='your_api_key_here')
    boards = await client.boards.query(board_ids=[1234567890, 1234567891])
    items_page = await client.items.items_page(board_ids=[1234567890, 1234567891])

asyncio.run(main())

Usage

Asynchronous Operations

All methods provided by the MondayClient are asynchronous and should be awaited. This allows for efficient concurrent execution of API calls.

Rate Limiting and Retry Logic

The client automatically handles rate limiting in compliance with Monday.com's API policies. When a rate limit is reached, the client will wait for the specified reset time before retrying the request. This ensures that your application doesn't need to manually handle rate limit exceptions and can operate smoothly.

Error Handling

Custom exceptions are defined for handling specific error cases:

  • MondayAPIError: Raised when an error occurs during API communication with Monday.com.
  • PaginationError: Raised when item pagination fails during a request.
  • QueryFormatError: Raised when there is a query formatting error.

These exceptions are handled internally by the client during retries. If the maximum number of retries is exceeded, the client will return an error response.

  • ComplexityLimitExceeded: Raised when the complexity limit is exceeded.
  • MutationLimitExceeded: Raised when the mutation limit is exceeded.

Logging

The client uses a logger named monday_client for all logging operations. By default, a NullHandler is added to suppress logging output. To enable logging, you can configure the logger in your application:

import logging

logger = logging.getLogger('monday_client')
logger.setLevel(logging.INFO)
handler = logging.StreamHandler()
handler.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s'))
logger.addHandler(handler)

License

This project is licensed under the GNU General Public License v3.0 - see the COPYING file for details.

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

monday_client-0.1.21.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

monday_client-0.1.21-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file monday_client-0.1.21.tar.gz.

File metadata

  • Download URL: monday_client-0.1.21.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for monday_client-0.1.21.tar.gz
Algorithm Hash digest
SHA256 f0ce53d61649bb5e240abbd66983db788a119298fc1fe5265c418e036d19650a
MD5 b8167f1c200bef2f83803cc2b63f6a71
BLAKE2b-256 024c7352a0e401070d8057d0abd6bf1448aff6f95e0b11c9f752eb02344110ba

See more details on using hashes here.

File details

Details for the file monday_client-0.1.21-py3-none-any.whl.

File metadata

File hashes

Hashes for monday_client-0.1.21-py3-none-any.whl
Algorithm Hash digest
SHA256 6552bd8a08cfa6d1eabf9c50fa75ea463bbe1a5f6a21607a5643ba3ce3add7cc
MD5 97ae09772127a103c9f4ea9f8eca8bd7
BLAKE2b-256 b12a36f988cf83f5b3852b1a9b13c9ed36fd1d6bf98f6370893ba94f930efa00

See more details on using hashes here.

Supported by

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