Python circuits Application Framework with an Event-driven and Component Architecture.
Asynchronous Component based Event Application Framework
circuits is a Lightweight Event driven and Asynchronous Application Framework for the Python Programming Language with a strong Component Architecture.
circuits also includes a lightweight, high performance and scalable HTTP/WSGI compliant web server as well as various I/O and Networking components.
circuits is a Lightweight Event driven and Asynchronous Application Framework for the Python Programming Language with a strong Component Architecture.
circuits also includes a lightweight, high performance and scalable HTTP/WSGI compliant web server and framework (circuits.web) as well as various I/O and Networking components.
To take full advantage of circuits and its architecture, circuits encourages you to design your application in terms of loosely coupled components. Circuits has a very powerful message passing system that enables components to interact with each other via events. Applications written this way tend to be more maintainable, easier to develop and scale to complex systems.
circuits' Loosely Coupled Component Architecture allows for a high level of Reuse and Scalability. Simpler components can be combined together to form Complex Components and provide higher level functionality and abstraction. Much of the circuits component library is designed and built this way.
Echo Server
#!/usr/bin/env python
from circuits.net.sockets import TCPServer
class EchoServer(TCPServer):
def read(self, sock, data):
return data
EchoServer(8000).run()
Web Server
#!/usr/bin/env python
from circuits.web import Server, Controller, Logger
class Root(Controller):
def index(self):
return "Hello World!"
(Server(("0.0.0.0", 8000)) + Root() + Logger()).run()
See PyPi Page, Website and Github Repo