Skip to main content

High-performance Python bindings for nng (nanomsg-next-gen)

Project description

nng

High-performance Python bindings for nng (nanomsg-next-gen), written in Cython.

Nanomsg-next-gen (NNG) is a high-performance messaging library written in C, which provides a simple and efficient API for building distributed applications. It supports various communication patterns, such as request-reply, publish-subscribe, and pipeline, and offers features like message framing, protocol handling, and transport abstraction.

Why yet another Python wrapper for NNG?

I am aware of two already existing Python wrappers for NNG.

I have started developing python-nng because after having tested ZeroMQ for a project, I wanted a library with similar concepts but with less user boilerplate. NNG seemed a good fit, but the existing Python wrappers didn't seem as mature as the Python bindings for ZeroMQ. I wanted complete docstrings and examples, benchmarks to inform decisions, and complete error handling in the codebase. In addition, during my experimentation I found out that async methods for ZeroMQ had a significant overhead, and that I could reduce it with a custom Selector using zmq_poll. NNG being callback-based for completions, I hoped for a better asyncio integration and less async overhead. To achieve this level of integration, Cython is needed, which the other wrappers didn't utilize.

Performance

See PERFORMANCE.md for detailed benchmarks and interpretation.

License

python-nng is licensed under the MIT License. See LICENSE for more details.

On the use of AI

Much of the writing has been assisted by AI (Claude Sonnet 4.6), in particular the benchmark code and the unit tests. I have 12 years of Python experience, and more in C/C++. I have written another Cython-based library DearCyGui. Thus while AI has been a great help, I have extensively reviewed, extended, and modified the code and documentation, and I am confident that the code is of good quality. If you find any issue, please open an issue or a PR.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nng-0.1.0.tar.gz (843.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nng-0.1.0-cp314-cp314t-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.14tWindows x86-64

nng-0.1.0-cp314-cp314t-manylinux_2_28_x86_64.whl (839.4 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ x86-64

nng-0.1.0-cp314-cp314t-macosx_11_0_arm64.whl (716.7 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

nng-0.1.0-cp314-cp314t-macosx_10_15_x86_64.whl (752.2 kB view details)

Uploaded CPython 3.14tmacOS 10.15+ x86-64

nng-0.1.0-cp314-cp314-win_amd64.whl (979.5 kB view details)

Uploaded CPython 3.14Windows x86-64

nng-0.1.0-cp314-cp314-manylinux_2_28_x86_64.whl (840.5 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

nng-0.1.0-cp314-cp314-macosx_11_0_arm64.whl (701.9 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

nng-0.1.0-cp314-cp314-macosx_10_15_x86_64.whl (739.4 kB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64

nng-0.1.0-cp313-cp313t-win_amd64.whl (996.1 kB view details)

Uploaded CPython 3.13tWindows x86-64

nng-0.1.0-cp313-cp313t-manylinux_2_28_x86_64.whl (838.8 kB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.28+ x86-64

nng-0.1.0-cp313-cp313t-macosx_11_0_arm64.whl (716.1 kB view details)

Uploaded CPython 3.13tmacOS 11.0+ ARM64

nng-0.1.0-cp313-cp313t-macosx_10_15_x86_64.whl (750.9 kB view details)

Uploaded CPython 3.13tmacOS 10.15+ x86-64

nng-0.1.0-cp313-cp313-win_amd64.whl (966.5 kB view details)

Uploaded CPython 3.13Windows x86-64

nng-0.1.0-cp313-cp313-manylinux_2_28_x86_64.whl (838.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

nng-0.1.0-cp313-cp313-macosx_11_0_arm64.whl (700.0 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

nng-0.1.0-cp313-cp313-macosx_10_15_x86_64.whl (738.2 kB view details)

Uploaded CPython 3.13macOS 10.15+ x86-64

nng-0.1.0-cp312-cp312-win_amd64.whl (965.0 kB view details)

Uploaded CPython 3.12Windows x86-64

nng-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl (838.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

nng-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (700.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

nng-0.1.0-cp312-cp312-macosx_10_15_x86_64.whl (738.7 kB view details)

Uploaded CPython 3.12macOS 10.15+ x86-64

nng-0.1.0-cp311-cp311-win_amd64.whl (971.7 kB view details)

Uploaded CPython 3.11Windows x86-64

nng-0.1.0-cp311-cp311-manylinux_2_28_x86_64.whl (851.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

nng-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (699.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

nng-0.1.0-cp311-cp311-macosx_10_15_x86_64.whl (737.2 kB view details)

Uploaded CPython 3.11macOS 10.15+ x86-64

File details

Details for the file nng-0.1.0.tar.gz.

File metadata

  • Download URL: nng-0.1.0.tar.gz
  • Upload date:
  • Size: 843.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nng-0.1.0.tar.gz
Algorithm Hash digest
SHA256 06039aa17ed3413066957b9b09836b88d9aedf70d1c44eb0cb8fabceb38cc714
MD5 995d95146831d89758cdd6b13e58793d
BLAKE2b-256 ede3282a5decbe46c1de654394051875a20e4105df31ac2d9b81f3e1242eb95b

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: nng-0.1.0-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nng-0.1.0-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 4b52b9b8e56af817cf1804ca569761bbfed60624989c8474f60db037f2408a91
MD5 c597853e03c492247666c1ea651715e5
BLAKE2b-256 13d9df9ba337eb10c8c7d523167ce673d7522f4ad5f33e9424efc07659ecee0f

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp314-cp314t-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nng-0.1.0-cp314-cp314t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4118ec1ae790d364a4793673e3edce42f7f959d1d27be4bf17769c50799a68f3
MD5 275e7600bd347f0cbc27fb2323d873d1
BLAKE2b-256 6214e656f606d91c08f6c6dbb6ff7d92c31c12496175841d4b9d2ab5d258811b

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nng-0.1.0-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c7d8f7be0fa6bccbb70df4251f08bd933461772b927c78a9d77b291f745ac929
MD5 2d0f7fa4748fadab00775eeb79b4e8be
BLAKE2b-256 18eb54c502d0db0034de99575f970df8305c88d1593e005e422d5d356ce821ae

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp314-cp314t-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for nng-0.1.0-cp314-cp314t-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 5c98726e898f4aaba3f5ba9e5961ae6cf160cb770fa37d649fcd4add3fbb3c2e
MD5 19d682a534679c76b1cf353f9a43f722
BLAKE2b-256 cf69d5e3e5046ad74fad682c051d3438ed567634cbdbe5122f78fdb092ce33e9

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: nng-0.1.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 979.5 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nng-0.1.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 dd1660931c169e770bcf99af134bf7cc4c14846a2b931bd217811fbbc6b0ec4f
MD5 7aaf9481eee383f6ca20644b214651d3
BLAKE2b-256 4685d1c91a695c572af9f764327fca1c591d12bd02509f2090eb7ee161823896

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nng-0.1.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 30e105cea202e23dfb55e933d5304941ea90b9e90ba60caa9e4644d980d6b5e8
MD5 6b5e2d6ab21df3271abdfada3ed874fe
BLAKE2b-256 c6001e9e32c52d99a602fe12b3d0e75811e2648360509ee5906c65af9646a329

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

  • Download URL: nng-0.1.0-cp314-cp314-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 701.9 kB
  • Tags: CPython 3.14, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nng-0.1.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 afcd1e37e491f570bff78dd6a54a63f2b72b63950db9d10bb9b8a38a7af1c818
MD5 7f98f4baa3f55eefe57e6f5926511d08
BLAKE2b-256 2046b0659d2243fec68c0f68f99d84f6d2057698d95193232e1909048df0aa5b

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp314-cp314-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for nng-0.1.0-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 e819622c56107b4e34e78e2dcf78c5121753b9033d6f1e320baa325d36f5c08f
MD5 482b921d693c767a922aba1931ea1cdb
BLAKE2b-256 15afec7fc75e4bb192c71af62246966d16b17ec6030f9c7a999fcb1183a1ef24

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp313-cp313t-win_amd64.whl.

File metadata

  • Download URL: nng-0.1.0-cp313-cp313t-win_amd64.whl
  • Upload date:
  • Size: 996.1 kB
  • Tags: CPython 3.13t, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nng-0.1.0-cp313-cp313t-win_amd64.whl
Algorithm Hash digest
SHA256 c75fa38bcd3f2f486d6ddc05ca0f737112f9130911612f4b735334256bb9a4c1
MD5 b4c2bc8a59eb21baebab73f1041a0277
BLAKE2b-256 ef6419d0d2c1e1e216a5e71a97b81c602d2130eca1485ab199a15bbcc709ad83

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp313-cp313t-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nng-0.1.0-cp313-cp313t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 76f23bee283e1ea1c439c1f5c0039f62590675e076300e5a084d328d17a9ae85
MD5 df5f72db5ca2f573014003d4e0ecdfd2
BLAKE2b-256 143811088c2ec174603fff91273fe48945c92a4830662676a5e36156edcc1258

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp313-cp313t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nng-0.1.0-cp313-cp313t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0c6a0cb9c0ef504d4c863eec72bab92fd103f40a4f69919f57436b9860036c46
MD5 26516b991c9ed60e3de65ba39918cb9a
BLAKE2b-256 73167ba1bd874f4da8d7ebe073cb1b8124db75381b85818b945b1e6d405d8b19

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp313-cp313t-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for nng-0.1.0-cp313-cp313t-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 13399ff5f286304168828ee82e65e27cdc62143b4375584953d09fbdf58007f7
MD5 8eb61b07755e26d3d3684f4a06b103ef
BLAKE2b-256 af39aa943e66b91f0cc7aabd7fb3bf59068124498567c80f405ebd1c9c1d2217

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: nng-0.1.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 966.5 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nng-0.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2ecfa7946c23f37392242292df101b030f5a37c7aa45b734be59fc7daf72341b
MD5 859db63a090f4fa3dc9b7a8e5d0b7cf5
BLAKE2b-256 9c6c3336c057145a9c212ce0a8a5227c4262bc16131e69c6c958b9765f837a4b

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nng-0.1.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8d0362cbf2aa90ae5d240b06b28d62d56041a35d3acb7c45142c35f5f52fa9fb
MD5 9e779d371f493f249fa46c0df4e5926a
BLAKE2b-256 e7ebbb7d3ef65e19ec679e35ecb7f03e5d8cb71ed2c514b7bd1bcb7a29ed2ddc

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

  • Download URL: nng-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 700.0 kB
  • Tags: CPython 3.13, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nng-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 53b9a89509197282bd99fc6ead4f7db6b887e372d58c7d1b8e03353ba12289b7
MD5 eb3e2f532652800113b54837984ffe4e
BLAKE2b-256 e73540f82cb4a8f96f28bc0086c64888c734d7889eadbd60c47206eef54c50af

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp313-cp313-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for nng-0.1.0-cp313-cp313-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 b64b9d25e9a351c3fab859386d0cb9b964eba919de0563be36e453a2c4c3b3fd
MD5 647cce04b8627c0f667969ec88dcc3d9
BLAKE2b-256 d8c7f6a385b2e36e69104cdfa525efb5d2bd71ca27877c113c423980faddbba5

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: nng-0.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 965.0 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nng-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 83f0a39ab8a147fc7031a9c3a0226f08ea8ec0c5860805d2fd849046b720e21a
MD5 1d2d91001e836a851171d40c14d984d4
BLAKE2b-256 f77c9bbb57d570ddb0d21492b90ada525168dc2291a40fa3e1570f9e536b5ba6

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nng-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bb83b6ba61deddc008da87a61c93afe1bc445f2c733b23762f71fd85d760c708
MD5 dd5893b6d2aeee4015e0429deb1df903
BLAKE2b-256 a0279dfc0ab57c8b62b8d83c80d1503600fa88ca283659353aff6213807aa479

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

  • Download URL: nng-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 700.8 kB
  • Tags: CPython 3.12, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nng-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 00bfbbf4a48aec42fbdfc8b956dfe12a10b38a2dca58041fd8a2c11304697e6e
MD5 d9552d0faf0de86163c3be359dff1c02
BLAKE2b-256 0114afcc5c26974170c0084f76676045c65d0c58ee8b26d96f15ce155623415d

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp312-cp312-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for nng-0.1.0-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 5e909e44813989c8c58c131e466fd001c2eebbb2d9bed0481767b1f6260b5a38
MD5 62964eeedab14aa9152f675c1c97d3b5
BLAKE2b-256 73d0376d6ba87e97149981a98877f2e2e1d897ebd4032e0ee9d1a1eaf0f0d73c

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: nng-0.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 971.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nng-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 af48c78c730f834daf0d5a40a53bbb674fe4b6f19eeb178c9dfa6a59398022cf
MD5 8a4c415486afe3bbe41313fafbe127e6
BLAKE2b-256 92bb05a3efe615d56d1b5d1d1b40a2ce1f99adc5beb8dcc37a1e0267d791c741

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nng-0.1.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9f350be3af607e8acee561c662a8630d8ca95393392eddfdfb37c70699929963
MD5 2d6c82509dfe836f589fbb471bb1e098
BLAKE2b-256 210ad65ff8878d9d2f2e12bf93db30d17cdd69edcbf9713a5a4b169cc4599295

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

  • Download URL: nng-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 699.9 kB
  • Tags: CPython 3.11, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for nng-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cf24fd3cada948f0c8a0fd45d98c4e949f05c6ec8f3286c6a3374b19235e4b53
MD5 8e608715ddc2a42502c30f33550d2fd5
BLAKE2b-256 3e010866588e0f97e22cbadb84200aa689d3232c9667b2f4703d04967bd3a24b

See more details on using hashes here.

File details

Details for the file nng-0.1.0-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for nng-0.1.0-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 630b5ada50e84f5c73b1d46b98573cf34704ed42b9b15837e4712928ebc1788c
MD5 6df2d7c6a289998c09a093d31f4529bd
BLAKE2b-256 3e38c58b4efba1fb93ee298a63b1708d5197ddbd8dd97d0016e72a8041da8769

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page