pycapnp
A cython wrapping of the C++ Cap'n Proto library
Decision gist · record as of 2026-08-14
Yes, if you need schema-driven serialization and RPC with Cap'n Proto and can meet C++14 compiler and build-tool requirements. Production-stable, actively maintained, no known vulnerabilities, prebuilt wheels for common platforms. Not recommended if you cannot install a C++ compiler or prefer pure-Python serialization.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires C++14-compatible compiler (gcc 6.1+, clang 6+, or Visual Studio 2017+), cmake, and Python development headers.
- On Linux, Python dev headers often in separate package.
- 32-bit Linux requires capnproto compiled with -fPIC.
License · maintenance · safety
BSD-2-Clause (permissive) — BSD-2-Clause is permissive; you may use, modify, and distribute pycapnp freely in open-source and commercial projects, provided you retain the license notice and disclaimer.
last release 2026-07-03 (42 days) · last repo commit 2026-07-11 · 533 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,719,080 downloads/mo, #3,620 on PyPI
Alternatives
Verify before relying
pip install pycapnp
import capnp
# Schema-based message creation and serialization
message = capnp.new_message()
message.write(open('data.bin', 'w'))- Whether bundled capnproto (1.4.0 as of v2.2.4) meets your requirements or system-installed version is preferred.
- Performance characteristics and serialization overhead versus other Python serialization frameworks.
- Practical PyPy compatibility beyond classifier listing.
- Specific RPC latency and throughput characteristics for your use case.
What it is and what it does
pycapnp wraps the C++ Cap'n Proto library, bringing schema-driven serialization and RPC to Python. Cap'n Proto is a data interchange format designed for speed—messages defined in a schema serialize to compact binary format, avoiding deserialization overhead. The library supports both synchronous and asynchronous RPC via a promise-style API, useful for distributed systems where efficiency matters.
The package includes prebuilt wheels for Python 3.9 through 3.14 on Linux, macOS, and Windows, though source builds require compilation tooling. It depends only on jinja2 at runtime. The library is actively maintained with recent fixes for memory leaks and NULL pointer dereferences, stable since initial release in 2013.
Use it for
- Serialize structured data to compact binary format for efficient storage or network transmission.
- Implement RPC servers and clients with async/await support for inter-process communication.
- Define strongly-typed message schemas to enforce data contracts across service boundaries.
- Build distributed systems where serialization overhead and latency are critical.
- Exchange data with other Cap'n Proto implementations using shared schema definitions.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need schema-driven serialization and RPC with Cap'n Proto and can meet C++14 compiler and build-tool requirements.
Production-stable, actively maintained, no known vulnerabilities, prebuilt wheels for common platforms. Not recommended if you cannot install a C++ compiler or prefer pure-Python serialization.
Install
pycapnp on PyPI
Before you install
Medium install friction: requires a C++14 compiler, cmake, and Python development headers. Prebuilt wheels available for Python 3.9–3.14 on Linux, macOS, and Windows, but source builds need compilation tooling. Actively maintained with recent release (42 days old) and no known vulnerabilities.
Requires C++14-compatible compiler (gcc 6.1+, clang 6+, or Visual Studio 2017+), cmake, and Python development headers. On Linux, Python dev headers often in separate package. 32-bit Linux requires capnproto compiled with -fPIC.
License in practice
BSD-2-Clause is permissive; you may use, modify, and distribute pycapnp freely in open-source and commercial projects, provided you retain the license notice and disclaimer.
Quickstart
pip install pycapnp
import capnp
# Schema-based message creation and serialization
message = capnp.new_message()
message.write(open('data.bin', 'w'))
Verify before relying
- Whether bundled capnproto (1.4.0 as of v2.2.4) meets your requirements or system-installed version is preferred.
- Performance characteristics and serialization overhead versus other Python serialization frameworks.
- Practical PyPy compatibility beyond classifier listing.
- Specific RPC latency and throughput characteristics for your use case.
Package facts
| License | BSD-2-Clause permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagejinja2 |
| Maintenance | Actively maintained 42 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,719,080 / month, #3,620 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: Windows :: Windows 10Operating System :: POSIXProgramming Language :: C++Programming Language :: CythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPyTopic :: Communications |
Evidence: pycapnp-2.2.4-cp310-cp310-macosx_10_9_x86_64.whl; pycapnp-2.2.4-cp310-cp310-macosx_11_0_arm64.whl; pycapnp-2.2.4-cp310-cp310-manylinux_2_28_aarch64.whl; pycapnp-2.2.4-cp310-cp310-manylinux_2_28_i686.whl; pycapnp-2.2.4-cp310-cp310-manylinux_2_28_ppc64le.whl; pycapnp-2.2.4-cp310-cp310-manylinux_2_28_s390x.whl; pycapnp-2.2.4-cp310-cp310-manylinux_2_28_x86_64.whl; pycapnp-2.2.4-cp310-cp310-musllinux_1_2_aarch64.whl; pycapnp-2.2.4-cp310-cp310-musllinux_1_2_i686.whl; pycapnp-2.2.4-cp310-cp310-musllinux_1_2_ppc64le.whl; pycapnp-2.2.4-cp310-cp310-musllinux_1_2_s390x.whl; pycapnp-2.2.4-cp310-cp310-musllinux_1_2_x86_64.whl; pycapnp-2.2.4-cp310-cp310-win32.whl; pycapnp-2.2.4-cp310-cp310-win_amd64.whl; pycapnp-2.2.4-cp311-cp311-macosx_10_9_x86_64.whl; pycapnp-2.2.4-cp311-cp311-macosx_11_0_arm64.whl; pycapnp-2.2.4-cp311-cp311-manylinux_2_28_aarch64.whl; pycapnp-2.2.4-cp311-cp311-manylinux_2_28_i686.whl; pycapnp-2.2.4-cp311-cp311-manylinux_2_28_ppc64le.whl; pycapnp-2.2.4-cp311-cp311-manylinux_2_28_s390x.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “cap'n proto python”
- pycapnppycapnp is a Python binding for Cap'n Proto, a serialization and RPC…
- zhinst-commszhinst-comms provides protocol stack bindings to communicate with…
- asyncio-throttleProvides a simple async context manager to limit the rate at which…
Give your agent the search over MCP, or paste the wish link into any chat.
More Communications packages
Pyasn1 encodes and decodes ASN.1 data structures using BER, CER, DER, and native Python codecs, allowing you to serialize complex data for network protocols and file formats.
Install it if you need to work with ASN.1-based protocols or formats; it is the standard library for this in Python and has no known vulnerabilities.
Provides a collection of ASN.1 data structures expressed as Python classes, built on the pyasn1 library, for working with ASN.1-based protocols and standards.
Kombu is a messaging library that provides a high-level Python interface to AMQP and other message brokers, supporting pluggable transports for RabbitMQ, Redis, MongoDB, Amazon SQS, and others.
Install it if you are building any distributed system that requires reliable message passing.
Formats and parses numbers, file sizes, timespans, and other values into human-readable text; provides terminal interaction utilities including ANSI text styling and user prompts.
Adds colored output to Python's standard logging module using ANSI escape sequences, with automatic fallback support for Windows terminals.
However, it is abandoned and receives no maintenance, so it will not adapt to future Python changes or platform updates.
Parse, validate, format, and analyze international phone numbers across all countries, with support for extracting geographic, carrier, and timezone information from phone number data.
See also zhinst-comms · grpcio-tools · ManimPango · betterproto · PyBindGen · Cython · scikit-build-core · smg-grpc-proto · nanopb · clang