A simple HTTP accessible database for IoT projects
BlanketDB is a very simple database written in Python based on SQLite. It is intended for small IoT projects where you need a quick way to collect and store data from sensors and other devices. You communicate to BlanketDB using HTTP GET / POST / DELETE requests. Request and response bodies are usually JSON, but you can also POST HTML forms directly to BlanketDB. There is no schema in the database, you simply store objects in buckets.
BlanketDB is free software provided under a MIT license. Documentation is available at https://blanketdb.readthedocs.io.
- GET / POST / DELETE requests to communicate with BlanketDB
- JSON requests / responses
- HTML forms can POST directly to BlanketDB
- Data stored in buckets
- Query using various parameters to a HTTP GET request
- Data is stored in a single file on the file system which is a SQLite database
- BlanketDB is a single Python file without any dependencies besides the standard library
- No sequrity whatsoever; BlanketDB is completely open to readers and writers (use with care!)
To install BlanketDB, you’ll need a Python (>=3.4) installation with pip:
$ pip install blanketdb
To use BlanketDB as a standalone database (and communicate over HTTP), enter the following command:
$ python3 -m blanketdb -i localhost -p 8080 -f /path/to/db.sqlite
BlanketDB will now serve its web interface at http://localhost:8080. You can open this page in your browser to check if everything works.
To use BlanketDB in a Python project, enter the following code:
from blanketdb import BlanketDB db = BlanketDB('/path/to/db.sqlite') # you can now use db using its Python API db.store_dict(x='test')['id'] for entry in db: print(entry) # db is alse a wsgi conforming callable # you can use it e.g. with the wsgi reference implementation from wsgiref.simple_server import make_server httpd = make_server('localhost', 8080, db) httpd.serve_forever()
Detailed documentation is available at https://blanketdb.readthedocs.io.
- Start uwsgi using http protocol by default in DOCKERFILE (s.t. standalone use is possible)
- Overwrite CMD in docker-compose file to communicate via uwsgi protocol between nginx and blanketdb container
- Support Python 3.8
- Split tests into Python and HTTP API tests
- Added tests that can be executed against an actual HTTP API of BlanketDB
- Release to trigger build on dockerhub
- Improved clarity with default values
- Type annotations for BlanketDB
- Python 3.4 is not supported anymore (as it does not know type annotations)
- setuptools entrypoint for cli
- quickstart documentation
- added logo
- fix tag confusion
- Added CLI for starting BlanketDB with wsgiref.simple_server
- Tests for BlanketDB Web API using webtest
- Added documentation for usage and Web API
- First release on PyPI.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size blanketdb-0.4.0-py2.py3-none-any.whl (12.8 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size blanketdb-0.4.0.tar.gz (36.5 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for blanketdb-0.4.0-py2.py3-none-any.whl