Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

A python wrapper for the ENet library

Project description

# pyenet

pyenet is a python wrapper for the ENet library by Lee Salzman,
http://enet.bespin.org

It was originally written by Scott Robinson <scott@tranzoa.com> and is
currently maintained by Andrew Resch <andrewresch@gmail.com>

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.

## License

pyenet is licensed under the BSD license, see LICENSE for details.
enet is licensed under the MIT license, see http://enet.bespin.org/License.html

## Dependencies

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

## Installation

### From pypi

```
pip install pyenet
```

### Manually from git

Note: the enet sources are automatically downloaded from http://enet.bespin.org/
by `setup.py`.

This version of pyenet requires enet 1.3.

Run the setup.py build:

```
$ python setup.py build
```

Once that is complete, install the new pyenet module:

```
# python setup.py install
```

## Packaging notes

- update package version in `setup.py`

- set up the venv:

```bash
python3 -m venv venv
source venv/bin/activate
pip install -r dev-requirements.txt
```

- build the sdist: `python setup.py sdist`
- build the bdist wheel:
- ```
sudo docker run -i -t -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /bin/bash
# from in docker container:
cd /io
/opt/python/cp36-cp36m/bin/pip install -r dev-requirements.txt
```
- upload to pypi: `twine upload dist/*`
- once successful: commit, tag, push to github

## Usage

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:
http://enet.bespin.org/Tutorial.html


Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
pyenet-1.3.13.post6-cp27-cp27m-manylinux1_x86_64.whl (339.3 kB) Copy SHA256 hash SHA256 Wheel cp27 Dec 15, 2017
pyenet-1.3.13.post6-cp27-cp27mu-manylinux1_x86_64.whl (339.3 kB) Copy SHA256 hash SHA256 Wheel cp27 Dec 15, 2017
pyenet-1.3.13.post6-cp33-cp33m-manylinux1_x86_64.whl (352.9 kB) Copy SHA256 hash SHA256 Wheel cp33 Dec 15, 2017
pyenet-1.3.13.post6-cp34-cp34m-manylinux1_x86_64.whl (379.3 kB) Copy SHA256 hash SHA256 Wheel cp34 Dec 15, 2017
pyenet-1.3.13.post6-cp35-cp35m-manylinux1_x86_64.whl (370.3 kB) Copy SHA256 hash SHA256 Wheel cp35 Dec 15, 2017
pyenet-1.3.13.post6-cp36-cp36m-manylinux1_x86_64.whl (376.1 kB) Copy SHA256 hash SHA256 Wheel cp36 Dec 15, 2017
pyenet-1.3.13.post6-cp36-cp36m-win_amd64.whl (82.4 kB) Copy SHA256 hash SHA256 Wheel cp36 Jan 17, 2018
pyenet-1.3.13.post6.tar.gz (14.3 kB) Copy SHA256 hash SHA256 Source None Dec 15, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page