--- id: lark-oapi version: "1.7.2" license: MIT license_treatment: permissive maintenance: active --- # lark-oapi — Lark OpenAPI SDK for Python License: permissive · Maintenance: active · Downloads: 2.9M/mo ## What it is and what it does This is the official Python SDK for Feishu (also known as Lark), a workplace collaboration platform. It abstracts away the repetitive work of calling Feishu's server-side APIs—handling OAuth token lifecycle, cryptographic request signing, payload encryption/decryption, and event routing—so you can focus on building features rather than protocol plumbing. The SDK provides typed request and response models for messaging, contact management, approval workflows, spreadsheets, and other Feishu capabilities. You build a client with your app credentials, then call methods like `client.im.v1.message.create()` to send messages or handle incoming events through a dispatcher. The SDK supports both traditional app_secret authentication and keyless JWT-based assertion flows for external signing services. It also includes a one-click app registration flow that guides users through OAuth device-flow setup and lets you pre-configure scopes, events, and callbacks before they confirm. Use it for: - Build a Feishu bot that sends notifications or responds to messages in channels and direct chats. - Integrate Feishu messaging into a third-party service to notify users of events or alerts. - Automate approval workflows by programmatically creating and updating approval instances. - Sync data between Feishu Sheets or Base and external systems via the SDK's typed API models. - Handle incoming Feishu events (messages, card interactions) through the SDK's event dispatcher. - Register and configure a new Feishu app on behalf of a user via the OAuth device-flow helper. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Python SDK for the Feishu Open Platform that wraps API calls, token management, request signing, encryption/decryption, event dispatching, and typed request/response models for messaging, contacts, approval, sheets, Base, and other Feishu capabilities. Yes. The SDK is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and installs with low friction. It is the canonical way to integrate with Feishu's server APIs from Python; if you are building on Feishu or Lark, this is the right choice. ## Install pip install lark-oapi uv add lark-oapi poetry add lark-oapi ## Installing lark-oapi Before you install: Low install friction with a pure-wheel distribution. Active maintenance with a release 9 days ago and 549 repository stars. Supports Python 3.8 through 3.12. License in practice: MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you include the license notice. Quickstart: pip install lark-oapi import lark_oapi as lark from lark_oapi.api.im.v1 import * client = lark.Client.builder().app_id("cli_xxx").app_secret("your_app_secret").build() request = CreateMessageRequest.builder().receive_id_type("chat_id").request_body(CreateMessageRequestBody.builder().receive_id("oc_xxx").msg_type("text").content("{\"text\":\"hello world\"}").build()).build() response = client.im.v1.message.create(request) Requires Python 3.8 or later and valid Feishu app credentials (app_id and app_secret or client_assertion provider). Verify before relying: - Scope and completeness of Feishu API endpoints covered by this SDK version. - Performance characteristics and rate-limiting behavior under production load. - Backward compatibility guarantees across minor and patch versions. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 2.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags feishu openapi sdk python, lark api client library, feishu messaging sdk, lark open platform integration, feishu bot development, lark server-side api wrapper, feishu event handling sdk, feishu-lark, api-client, bot-framework [View on SkillFed](https://skillfed.io/packages/lark-oapi) · [View on PyPI](https://pypi.org/project/lark-oapi/)