• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

enet/H03-May-2022-51,05541,621

pyenet.egg-info/H03-May-2022-10572

ChangeLogH A D14-Dec-20171.1 KiB2720

LICENSEH A D14-Dec-20171.5 KiB128

MANIFEST.inH A D03-Nov-201894 74

PKG-INFOH A D03-Nov-20183.1 KiB10572

README.rstH A D03-May-20222.1 KiB9563

enet.cH A D03-Nov-2018811.8 KiB21,42414,071

enet.pyxH A D14-Dec-201732.7 KiB1,076840

setup.cfgH A D03-Nov-201838 53

setup.pyH A D03-Nov-20182 KiB7856

test_client.pyH A D14-Dec-20172.4 KiB8868

test_enet.pyH A D14-Dec-20177.5 KiB192155

test_server.pyH A D14-Dec-20172.2 KiB6551

README.rst

1pyenet
2======
3
4pyenet is a python wrapper for the ENet library by Lee Salzman,
5http://enet.bespin.org
6
7It was originally written by Scott Robinson scott@tranzoa.com and is
8currently maintained by Andrew Resch andrewresch@gmail.com
9
10This fork is being maintained by the piqueserver team for purposes of
11including patches for bugs found while developing piqueserver, and to
12provide a package on pypi.
13
14License
15-------
16
17pyenet is licensed under the BSD license, see LICENSE for details. enet
18is licensed under the MIT license, see
19http://enet.bespin.org/License.html
20
21Dependencies
22------------
23
24Building pyenet requires all the same dependencies as enet plus Cython
25and, obviously, Python.
26
27Installation
28------------
29
30From pypi
31~~~~~~~~~
32
33::
34
35    pip install pyenet
36
37Manually from git
38~~~~~~~~~~~~~~~~~
39
40Note: the enet sources are automatically downloaded from
41http://enet.bespin.org/ by ``setup.py``.
42
43This version of pyenet requires enet 1.3.
44
45Run the setup.py build:
46
47::
48
49    $ python setup.py build
50
51Once that is complete, install the new pyenet module:
52
53::
54
55    # python setup.py install
56
57Packaging notes
58---------------
59
60-  update package version in ``setup.py``
61-  create a virtualenv
62   (``python3 -m venv venv && source venv/bin/activate``)
63-  install the requirements: ``pip install -r dev-requirements.txt``
64-  build the source dist: ``python setup.py sdist``
65-  make sure docker is installed and running and you're on a 64bit linux
66   machine
67-  build the binary dists: ``./scripts/build_packages.sh``
68-  upload to pypi: ``twine upload dist/* wheelhouse/pyenet*``
69-  commit, tag, push to github
70
71Usage
72-----
73
74Once you have installed pyenet, you only need to import the enet module
75to start using enet in your project.
76
77Example server:
78
79::
80
81    >>> import enet
82    >>> host = enet.Host(enet.Address("localhost", 33333), 1, 0, 0)
83    >>> event = host.service(0)
84
85Example client:
86
87::
88
89    >>> import enet
90    >>> host = enet.Host(None, 1, 0, 0)
91    >>> peer = host.connect(enet.Address("localhost", 33333), 1)
92
93More information on usage can be obtained from:
94http://enet.bespin.org/Tutorial.html
95