An open API service indexing awesome lists of open source software.

https://github.com/reganto/usernado

Makes it Easy to Manage Tornado Applications :rocket:
https://github.com/reganto/usernado

python tornado tornado-extension tornadoweb

Last synced: 3 months ago
JSON representation

Makes it Easy to Manage Tornado Applications :rocket:

Awesome Lists containing this project

README

          




Usernado



Makes it Easy to Manage Tornado :tornado: Applications


Explore the docs »





Test

PyPI version


## Why Usernado

- Why not?

- I like :tornado:

- For every project I wrote with Tornado, I had to repeat the code for some parts. For example, to authenticate users, I had to write repeated code every time. So I decided to write an extension to solve my need.

## Features

- REST support :zap:

- Websocket easier than ever :zap:

- ORM agnostic authentication :zap:

- Humanize datetime in templates :zap:

- Better exception printer thanks to [tornado-debugger](https://github.com/bhch/tornado-debugger) :zap:

## Installation

Install either with pip or poetry.

```bash
pip install usernado
```
```bash
poetry add usernado
```

Or optionally you can install from github using
```bash
pip install git+https://github.com/reganto/usernado
```

## Usage

### Hello Usernado

```python
from usernado.helpers import api_route
from usernado import APIHandler
from tornado import web, ioloop

@api_route("/hello", name="hello")
class Hello(APIHandler):
def get(self):
self.response({"message": "Hello, Usernado"})

def make_app():
return web.Application(api_route.urls, autoreload=True)

def main():
app = make_app()
app.listen(8000)
ioloop.IOLoop.current().start()

if __name__ == "__main__":
main()
```

For more examples please Check out [examples](https://github.com/reganto/Usernado/tree/master/example).

## Roadmap

- [x] Send and broadcast for websockets
- [x] Abstracted authentication methods
- [x] Authenticaion methods should return True/False
- [x] Add diff_for_human (humanize) decorator
- [x] Add api_route for API handlers
- [x] Add username & password to test login
- [x] Add pluralize (str_plural) uimodule
- [x] Add pagination [:link:](https://github.com/reganto/tornado-pagination)

## Open your mailbox and
tell.reganto[at]gmail.com

Hello!