API Reference

class tiny_thingy.Thingy(*args, **kwargs)[source]

Represents a JSON object in a table

classmethod count()[source]

Count the number of objects in the table

classmethod create(obj)[source]

Directly insert an object in the table

delete()[source]

Delete the object from the table

classmethod find(query=None, doc_ids=None)[source]

Return a list of objects matching the query

classmethod find_one(query=None, doc_id=None)[source]

Return a single object matching the query

classmethod inplace_update(fields, query=None, doc_ids=None)[source]

Directly update objects matching the query with given fields

classmethod remove(query=None, doc_ids=None)[source]

Remove the objects matching the query

save()[source]

Save the object in the table

classmethod use_database(filename)[source]

Initialize a database for the class using the specified filename