kernel
The official Python library for the kernel API
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 on this page — 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
kernel on PyPI
pip
pip install kerneluv
uv add kernelpoetry
poetry add kernelInstalling 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 the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — anyio, distro, httpx, pydantic, sniffio, typing-extensions |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 175,687/month — #10,261 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: kernel-0.91.0-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
agentex-clientProvides a typed Python REST client for the…
permissive · top 15,000 on PyPI
opencode-aiProvides a Python client library for the…
permissive · top 15,000 on PyPI
composio-clientA Python client library for the Composio REST…
permissive · top 5,000 on PyPI
supermemoryProvides a Python client library for the…
permissive · top 15,000 on PyPI
cloudflareProvides a Python client library for the…
permissive · top 5,000 on PyPI
arcadepyProvides a typed Python client library for the…
permissive · top 15,000 on PyPI
runwaymlProvides a Python client library for the…
permissive · top 15,000 on PyPI
browserbaseBrowserbase is a Python client library for the…
permissive · top 5,000 on PyPI
bilibili-api-pythonProvides async Python bindings for Bilibili's…
copyleft · top 15,000 on PyPI
splunk-sdkProvides a Python client library for…
permissive · top 5,000 on PyPI