Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/thesage21/bottle-tools
- Owner: theSage21
- License: mit
- Created: 2019-01-04T09:07:14.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T06:41:59.000Z (about 2 years ago)
- Last Synced: 2023-02-27T13:07:11.853Z (almost 2 years ago)
- Topics: bottle, rest, rest-api
- Language: Python
- Homepage: https://bottle-tools.readthedocs.io/en/latest/
- Size: 90.8 KB
- Stars: 15
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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'
```