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

Documentation Status PyPI version Python Versions License: GPL v3 GitHub issues GitHub last commit

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

Documentation

For detailed documentation, visit the official documentation site.

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():
    monday_client = MondayClient(api_key='your_api_key_here')
    boards = await monday_client.boards.query(board_ids=[987654321, 876543210])
    items_page = await monday_client.items.items_page(board_ids=[123456789, 123456780])

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.
  • ComplexityLimitExceeded: Raised when the complexity limit and max retries are exceeded.
  • MutationLimitExceeded: Raised when the mutation limit and max retries are 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 LICENSE 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.57.tar.gz (41.8 kB view details)

Uploaded Source

Built Distribution

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

monday_client-0.1.57-py3-none-any.whl (48.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: monday_client-0.1.57.tar.gz
  • Upload date:
  • Size: 41.8 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.57.tar.gz
Algorithm Hash digest
SHA256 796e9d4b87f036378958918a9cd1f503ca7906bacb04edcedd0df07e7ea78718
MD5 899fa24077a186bcf10a8d6a50497ebe
BLAKE2b-256 b0463a6aae076cbf5688a75584e5b371135e4eeaac25366d8eb750853e27e3c3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: monday_client-0.1.57-py3-none-any.whl
  • Upload date:
  • Size: 48.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for monday_client-0.1.57-py3-none-any.whl
Algorithm Hash digest
SHA256 cdf54940b19bb5cbcd419211ea418bda88a4be90dc683ef9d0cfc165f0981b93
MD5 45b59fa9d94be6b2feb3892a312c35b3
BLAKE2b-256 700a3cf5f890a60fc66c7cb54a9e946326d41d3f3a3d5e44722f77fc07cb0cae

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