GithubHelp home page GithubHelp logo

aloha-pk / pyenet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from piqueserver/pyenet

0.0 0.0 0.0 1.65 MB

A python wrapper for the ENet library (this fork is the source for the pypi package)

License: BSD 3-Clause "New" or "Revised" License

Python 0.76% Shell 20.27% CMake 0.13% Makefile 1.69% C 11.52% M4 0.05% HTML 58.95% CSS 1.72% JavaScript 3.03% Lua 0.05% Cython 1.84%

pyenet's Introduction

pyenet

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

It was originally written by Scott Robinson [email protected] and is currently maintained by Andrew Resch [email protected]

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

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
  • 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 setup.py sdist
  • make sure docker is installed and running and you’re on a 64bit linux machine
  • build the binary dists: ./scripts/build_packages.sh
  • upload to pypi: twine upload dist/* wheelhouse/pyenet*
  • 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

pyenet's People

Contributors

aresch avatar notafile avatar edwardbetts avatar muffintastic avatar noway avatar whbdupree avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.