Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

monday-client

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monday-client

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

  • 0.1.60
  • Source
  • PyPI
  • Socket score

Maintainers
1

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 = await monday_client.items.query(item_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)

Or update an already existing logging config:

import logging.config

logging_config = config['logging']

logging_config['loggers'].update({
    'monday_client': {
        'handlers': ['file', 'console'],  # Use the same handlers as your main logger
        'level': 'INFO',  # Set appropriate level
        'propagate': False
    }
})

logging.config.dictConfig(logging_config)
logger = logging.getLogger(__name__)

License

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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc