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.
Documentation
For detailed documentation, please visit the official documentation site.
Key Features
- Asynchronous API calls using
asyncio
andaiohttp
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 LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file monday_client-0.1.31.tar.gz
.
File metadata
- Download URL: monday_client-0.1.31.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c5e8a939d7d0c44471a4224b11bc458ba3343d7051dcb709edc1f45e7096162 |
|
MD5 | 69e7851472626520e5b530644f17819d |
|
BLAKE2b-256 | 41ebf069444a49fa7042106e2b1f0ad0a8b1971c0ab9d2c9136abc3e52ab6f51 |
File details
Details for the file monday_client-0.1.31-py3-none-any.whl
.
File metadata
- Download URL: monday_client-0.1.31-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7aa0e46bea40f4f8a0f7b99e0b6f9cb485c29d732866a3487d57b3d10fefd9af |
|
MD5 | 572732d4772f17243903f77c843bf827 |
|
BLAKE2b-256 | ca385b57fb068ebe2e0e72b43a636610b2f62e52a2278dd5e46eb88d1ad6ecb0 |