Skip to main content

Interest is a event-driven web framework on top of aiohttp/asyncio.

Project description

# Interest

[![Travis](https://img.shields.io/travis/inventive-ninja/interest.svg)](https://travis-ci.org/inventive-ninja/interest)
[![Coveralls](http://img.shields.io/coveralls/inventive-ninja/interest.svg?branch=master)](https://coveralls.io/r/inventive-ninja/interest?branch=master)

Event-driven web framework on top of aiohttp/asyncio.

## Features

- event-driven on top of aiohttp/asyncio
- consistent, modular and flexible flow model, class-based
- configurable and pluggable

## Example

Install interest package:

```
$ pip install interest
```

Save the following code as `server.py`:


```python
# server.py
from interest import Service, http

class Service(Service):

# Public

@http.get('/')
def hello(self, request):
return http.Response(text='Hello World!')


# Listen forever
service = Service()
service.listen(host='127.0.0.1', port=9000, override=True, forever=True)
```

Run the server in the terminal and use another to interact:

```
$ python server.py
...
$ curl -X GET http://127.0.0.1:9000/; echo
Hello World!
...
```

## Read more

Please visit Interest's developer hub to get docs, news and support:

[Developer Hub](https://interest.readme.io/)

## Contributing

Please read the contribution guideline:

[How to Contribute](CONTRIBUTING.md)

Thanks!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for interest, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size interest-0.0.1-py3-none-any.whl (33.2 kB) File type Wheel Python version 3.5 Upload date Hashes View
Filename, size interest-0.0.1.tar.gz (20.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page