Skip to main content

A python wrapper for the ENet library

Project description

pyenet is a python wrapper for the ENet library by Lee Salzman,

It was originally written by Scott Robinson and is currently maintained by Andrew Resch

This fork is being maintained by the piqueserver team for purposes of including patches for bugs found while developing piqueserver, and to provide a package on pypi.


pyenet is licensed under the BSD license, see LICENSE for details. enet is licensed under the MIT license, see


Building pyenet requires all the same dependencies as enet plus Cython and, obviously, Python.


From pypi

pip install pyenet

Manually from git

Run the build:

$ python build

Once that is complete, install the new pyenet module:

# python install

Packaging notes

  • update package version in
  • create a virtualenv (python3 -m venv venv && source venv/bin/activate)
  • install the requirements: pip install -r dev-requirements.txt
  • build the source dist: python sdist
  • make sure docker is installed and running and you re on a 64bit linux machine
  • build the binary dists: ./scripts/
  • upload to pypi: twine upload dist/* wheelhouse/pyenet*
  • commit, tag, push to github


Once you have installed pyenet, you only need to import the enet module to start using enet in your project.

Example server:

>>> import enet
>>> host = enet.Host(enet.Address("localhost", 33333), 1, 0, 0)
>>> event = host.service(0)

Example client:

>>> import enet
>>> host = enet.Host(None, 1, 0, 0)
>>> peer = host.connect(enet.Address("localhost", 33333), 1)

More information on usage can be obtained from:

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

pyenet-1.3.14.tar.gz (786.3 kB view hashes)

Uploaded source

Built Distributions

pyenet-1.3.14-cp37-cp37m-win_amd64.whl (87.2 kB view hashes)

Uploaded cp37

pyenet-1.3.14-cp37-cp37m-win32.whl (69.3 kB view hashes)

Uploaded cp37

pyenet-1.3.14-cp36-cp36m-win_amd64.whl (87.4 kB view hashes)

Uploaded cp36

pyenet-1.3.14-cp36-cp36m-win32.whl (69.4 kB view hashes)

Uploaded cp36

pyenet-1.3.14-cp35-cp35m-win_amd64.whl (82.7 kB view hashes)

Uploaded cp35

pyenet-1.3.14-cp35-cp35m-win32.whl (64.1 kB view hashes)

Uploaded cp35

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page