flask-tinydb is a Flask extension that provides a TinyDB database.
Project description
flask-tinydb is a Flask extension that provides a TinyDB database.
tiny 🔍
fast 🚀
simple 💡
lightweight 📦
typed ✨
requirements
Python 3.9+
Flask 1.0+
TinyDB 4.0+
pyyaml 6.0+(optinal)
install
via pip:
pip install flask-tinydb
via source:
git clone https://github.com/mmdbalkhi/flask-tinydb.git cd flask-tinydb python setup.py install
usage
from flask import Flask, jsonify
from flask_tinydb import TinyDB
app = Flask(__name__)
db = TinyDB(app).get_db()
@app.route('/<username>')
def index(username):
db.insert({'name': username})
return f"{username} added to database"
@app.route('/users')
def users():
return jsonify(db.all())
if __name__ == '__main__':
app.run()
Links
Documentation: https://flask-tinydb.readthedocs.io/
Source Code: https://github.com/mmdbalkhi/flask-tinydb
Issue Tracker: https://github.com/mmdbalkhi/flask-tinydb/issues/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flask_tinydb-1.3.0.tar.gz.
File metadata
- Download URL: flask_tinydb-1.3.0.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da26c3bd92fe0a0092d97bd2bd43110537da94c85ca9f287c86187fc7e4f73f0
|
|
| MD5 |
b392cdca7eb4e70b4c54b71ba3ca5568
|
|
| BLAKE2b-256 |
921181ac131e99fb1bd748b0c49a41213a53262fb04fd800a8708a259dfa364a
|
File details
Details for the file Flask_tinydb-1.3.0-py3-none-any.whl.
File metadata
- Download URL: Flask_tinydb-1.3.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2e95b6fba80400203d6314c7e2d71afb6b09c6aae48e9901a7936912652d57d
|
|
| MD5 |
7ddaf824b25ed7bcf5a2621b396dbee2
|
|
| BLAKE2b-256 |
654587c99cd516f1bdcd1467086bccf85282147d44b6e4f22404dd8f5fcf52ff
|