Skip to content
/ pants Public

A lightweight framework for writing asynchronous network applications in Python.

License

Notifications You must be signed in to change notification settings

ecdavis/pants

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pants is complete and no longer actively maintained.

Pants is a lightweight framework for writing asynchronous network applications in Python. Pants is simple, fast and elegant.

Pants is available under the Apache License, Version 2.0

Docs

Check out the documentation at pantspowered.org

Install

Pants can be installed using pip:

pip install pants

You can also grab the latest code from the git repository:

git clone git://github.com/ecdavis/pants

Pants requires Python 2.7 - Python 3 is not yet supported.

Examples

Here's an absurdly simple example - an echo server:

from pants import Engine, Server, Stream

class Echo(Stream):
    def on_read(self, data):
        self.write(data)

Server(Echo).listen(4040)
Engine.instance().start()

Want a stupidly fast web server? Got you covered:

from pants.web import Application

app = Application()

@app.route('/')
def hello(request):
    return "Hello, World!"

app.run()

About

A lightweight framework for writing asynchronous network applications in Python.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages