Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ecdavis/pants
A lightweight framework for writing asynchronous network applications in Python.
https://github.com/ecdavis/pants
Last synced: 3 days ago
JSON representation
A lightweight framework for writing asynchronous network applications in Python.
- Host: GitHub
- URL: https://github.com/ecdavis/pants
- Owner: ecdavis
- License: apache-2.0
- Created: 2011-04-15T03:30:05.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2017-07-08T04:52:07.000Z (over 7 years ago)
- Last Synced: 2024-09-14T17:44:46.032Z (about 2 months ago)
- Language: Python
- Homepage: http://pantspowered.org/
- Size: 1.66 MB
- Stars: 167
- Watchers: 11
- Forks: 9
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
- Authors: AUTHORS.txt
Awesome Lists containing this project
- starred-awesome - pants - A lightweight framework for writing asynchronous network applications in Python. (Python)
README
[Pants](http://pantspowered.org/)
=================================
**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](http://www.apache.org/licenses/LICENSE-2.0.html)
Docs
====
Check out the documentation at [pantspowered.org](http://pantspowered.org/)Install
=======
Pants can be installed using [pip](http://http://pypi.python.org/pypi/pip):pip install pants
You can also grab the latest code from the [git](http://git-scm.com/)
repository:git clone git://github.com/ecdavis/pants
Pants requires [Python 2.7](http://python.org/) - Python 3 is not yet
supported.Examples
========
Here's an absurdly simple example - an echo server:
```python
from pants import Engine, Server, Streamclass 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:
```python
from pants.web import Applicationapp = Application()
@app.route('/')
def hello(request):
return "Hello, World!"app.run()
```