Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/thesage21/bottle-tools

Common tools to be used in conjunction with the bottle framework
https://github.com/thesage21/bottle-tools

bottle rest rest-api

Last synced: 4 months ago
JSON representation

Common tools to be used in conjunction with the bottle framework

Awesome Lists containing this project

README

        

Bottle-Tools
============

A set of tools to make things easier to work with when using Bottle.
[Full Documentation](https://bottle-tools.readthedocs.io/en/latest/)

Autofill APIs with typed information

```python

import bottle_tools as bt

bt.common_kwargs.update({"User": UserTable})

@app.post('/calculate')
@bt.fill_args(coerce_types=True)
def login(usrname: str, pwd: str, User):
user = User.get_or_404(usrname=usrname)
if not user.password_is_correct(pwd):
raise HttpNotFound()
return 'ok'
```