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:
- Host: GitHub
- URL: https://github.com/reganto/usernado
- Owner: reganto
- License: apache-2.0
- Created: 2018-11-25T06:37:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T07:25:04.000Z (over 3 years ago)
- Last Synced: 2025-09-20T13:19:25.880Z (9 months ago)
- Topics: python, tornado, tornado-extension, tornadoweb
- Language: Python
- Homepage:
- Size: 496 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## 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!
