skillfed

kernel

The official Python library for the kernel API

kernel v0.91.0 175.7K downloads/30d#10,261 on PyPI7
Permissive license Apache-2.0 Active released

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 kernel

uv

uv add kernel

poetry

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 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

Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

kernel api client pythonrest api client libraryasync http clienttyped api wrapperbrowser automation apideployment management clientpydantic typed responses
rest-api-clientasync-supporttype-hints

More Python Modules packages