--- id: kernel version: "0.91.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # kernel — The official Python library for the kernel API License: permissive · Maintenance: active · Downloads: 175.7K/mo ## What it is and what it does Kernel is an official Python client library for the Kernel REST API, generated by Stainless. It wraps HTTP calls to the Kernel service with type-safe request and response objects, built on httpx for both sync and async I/O. The library includes full type hints for all API parameters and responses, Pydantic models for responses with serialization helpers, and automatic pagination for list endpoints. You instantiate a Kernel or AsyncKernel client with an API key, then call methods like `client.browsers.create()` or `client.deployments.list()` to interact with the service. The library handles retries automatically (2 attempts by default for connection errors, timeouts, rate limits, and 5xx errors) and provides detailed error types for different HTTP status codes. Async usage is identical to sync except for await keywords, and you can optionally use aiohttp instead of httpx for the async backend. Use it for: - Automate browser creation and management for web scraping or testing via the Kernel API. - Deploy and manage applications programmatically using the deployments endpoint. - Build async-first applications that need concurrent API calls with automatic pagination. - Integrate Kernel's browser or deployment services into a larger Python application with full type safety. - Handle API errors gracefully with specific exception types for different HTTP status codes. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a Python client library for the Kernel REST API, with synchronous and asynchronous interfaces, full type hints, and automatic pagination support. Yes, if you need to integrate with the Kernel API. The library is actively maintained, has no known vulnerabilities, low install friction, and provides a well-typed interface with both sync and async support. The recent release and active repository suggest ongoing development. Verify that the Kernel service itself meets your production requirements before committing. ## Install pip install kernel uv add kernel poetry add kernel ## Installing kernel Before you install: Low install friction with a pure-Python wheel and six common dependencies. Actively maintained with a recent release and no known vulnerabilities. License in practice: Apache-2.0 is permissive; you can use, modify, and distribute this library freely in commercial and private projects with minimal restrictions. Quickstart: pip install kernel import os from kernel import Kernel client = Kernel(api_key=os.environ.get("KERNEL_API_KEY")) browser = client.browsers.create(stealth=True) print(browser.session_id) Requires Python 3.9 or later and a valid KERNEL_API_KEY environment variable or passed as an argument. Verify before relying: - Whether the Kernel service itself is production-ready or still in beta. - Rate limits and quota policies for the underlying Kernel API. - Performance characteristics when handling large paginated result sets. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 175.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags kernel api client python, rest api client library, async http client, typed api wrapper, browser automation api, deployment management client, pydantic typed responses, rest-api-client, async-support, type-hints [View on SkillFed](https://skillfed.io/packages/kernel) · [View on PyPI](https://pypi.org/project/kernel/)