Skip to main content
pygel
=====

*pygel* is a pure-python event loop library that works on *Python 2.7+*, *Python 3.4+* and PyPy as well

*pygel* implements its own event loop library from scratch using [socketqueue](http://github.com/caetanus/socketqueue/)

it was initially based on pygtk2/gobject interfaces but has gained its own life and its own interfaces and the pygtk2/gobject is no longer supported anymore

it can interface with another event libraries as Qt4, Qt5, Gi(work in progress), pygtk2(work in progress)

in some level it mimicks single flow application in some methods as: *sleep*, *selector* and *@threaded_wrapper*

A more deatailed documentation is in progress.


Usage Example
---------------------


```python

"""
example using pygel
"""

import socket
from gel import Gel

reactor = Gel()
socket_server = socket.socket()
socket_server.bind(("", 12345))
socket_server.listen()
my_socket = socket.socket()
my_socket.connect(socket_server.getsockname())
connection, _ = socket_server.accept()

def application():
connection.send(b"some data")
reactor.sleep(2000)
print("sleeping doesn't stop the main_loop")

def on_socket_read(sock):
print("data received", sock.recv(1024))

def timeout():
print("i'm called after the timeout.")
reactor.main_quit()

reactor.register_io(my_socket)
reactor.idle_call(application)
reactor.timeout_call_seconds(3.0, timeout)
reactor.main()
```


Release files for pygel 0.6.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pygel 0.6.5
File Size Uploaded
pygel-0.6.5.tar.gz 13.6 kB Details

Release files / pygel-0.6.5.tar.gz

Download URL pygel-0.6.5.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
32dae6b6d342bb13f2af471245a8d2f14191796ec00b89aac348f0f73d2dddeb
BLAKE2b-256 checksum
How to use checksums
b95bfbdb1f69b91da49ddc4d9fe9b97f80b9aad8965e7bb1a772222a63cb9f8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.6.5 This release

1 release file

0.6.4

1 release file

0.6.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.3.0

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page