skip to navigation
skip to content

tiddly 1.0.11

Flask-Tiddly is a minimal, prototype RESTful server for basic CRUD transactions.

tiddly is a minimal, prototype RESTful server app for basic CRUD transactions. It is database agnostic and uses sqlalchemy on the backend to talk to RDBMS. The database is sqlite by default, but you can switch to anything you want by making this small change in the file:

#TODO: Change as needed: engine = create_engine(“sqlite:///tiddly.db”, echo=True) Base = declarative_base()

You can host this app and use it as your own replacement for any cloud based backend such as firebase or CouchDB as long as you follow the CRUD based I/O approach. The RESTful methods are versatile and compatible with the data needs of typical Single Page Apps developed in frameworks like angular, backbone or ember. For example:

Request | url | body | Action |
—– | —– | —– | —– |
GET | /books | | Get all rows from the books table.|
GET | /books/1 | | Fetch the book record where the id field equals 1.|
POST | /books | {“name”:”Harry Potter and the order of the Phoenix.”} | Insert record into books table from posted JSON data.|
PUT | /books/1 | {“name”:”Some new title.”} | Update the record where id equals 1 with posted JSON data.|
DELETE | /books/1 | | Delete the record where id equals 1.|