--- id: pynng version: "0.9.0" license: The MIT License Copyright 2018-2019 Cody Piersall and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation… (full text in the JSON record) license_treatment: permissive maintenance: active --- # pynng — Networking made simply using nng License: permissive · Maintenance: active · Downloads: 225.7K/mo ## What it is and what it does pynng wraps the nng C library to provide ergonomic Python bindings for inter-process and network communication. It supports multiple messaging patterns—Pair (bidirectional), Pub/Sub, Request/Response, Push/Pull, and Surveyor/Respondent—making it suitable for building distributed systems, service discovery, and message aggregation. The library works as a context manager and integrates with async frameworks including asyncio, trio, and curio, allowing both synchronous and asynchronous send/receive operations. The package depends on cffi and sniffio for FFI bindings and async runtime detection. It is classified as Alpha development status but maintains an active repository with recent commits. Prebuilt wheels are available for modern Python versions on Windows, macOS, and Linux, though source builds on 32-bit systems or older macOS require CMake. Use it for: - Build request-response microservices where clients send queries and servers respond with results. - Implement publish-subscribe systems to broadcast messages to multiple subscribers. - Aggregate messages from multiple producers using Push/Pull sockets with load balancing. - Perform service discovery by broadcasting surveys to respondents and collecting their replies. - Create async inter-process communication pipelines using trio or asyncio for concurrent message handling. - Replace ZeroMQ in applications requiring simpler, more ergonomic messaging APIs. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides Python bindings for nng (nanomsg next generation), enabling inter-process and network communication with support for multiple messaging patterns and async frameworks. Yes, if you need inter-process or network messaging with multiple patterns and async support. The MIT license, active maintenance, and prebuilt wheels for common platforms make it low-friction. The Alpha status and medium install friction are acceptable trade-offs for projects that fit its messaging model. Not suitable if you require stable 1.0+ APIs or need support for platforms without prebuilt wheels. ## Install pip install pynng uv add pynng poetry add pynng ## Installing pynng Before you install: Medium install friction due to compiled dependencies; prebuilt wheels available for Python 3.10 and 3.11 on Windows, macOS, and Linux, but 32-bit Linux and macOS require CMake. Repository is active with recent commits and no archived status. License in practice: MIT license (permissive) allows unrestricted use, modification, and distribution. No copyleft obligations or commercial restrictions. Quickstart: pip install pynng from pynng import Pair0 with Pair0(listen='tcp://127.0.0.1:54321') as s1, \ Pair0(dial='tcp://127.0.0.1:54321') as s2: s1.send(b'hello') print(s2.recv()) CMake required for 32-bit Linux and macOS builds from source; prebuilt wheels available for common platforms. Verify before relying: - Whether Python 3.6–3.9 support is actively maintained or only documented in classifiers - Performance characteristics and latency guarantees compared to other messaging libraries - Stability timeline from Alpha development status to Beta or stable release ## Package facts - License: The MIT License Copyright 2018-2019 Cody Piersall and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation… (full text in the JSON record) (permissive) - Python support: unspecified - Install friction: medium - Maintenance: active - Downloads: 225.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags nng python bindings, inter-process messaging, async networking library, nanomsg next generation, message passing patterns, network communication, pub-sub messaging, request-response protocol, async-io, message-passing, distributed-systems [View on SkillFed](https://skillfed.io/packages/pynng) · [View on PyPI](https://pypi.org/project/pynng/)