Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A tiny storage layer. (v0.4) Serious Python Programmers™ with Enterprise Requirements need not apply.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 .gitignore
Octocat-spinner-32 AUTHORS
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 TODO
Octocat-spinner-32 bitty.py
Octocat-spinner-32 setup.py
Octocat-spinner-32 tests.py
README.md

bitty.py

A tiny storage layer.

Why another storage layer?

I wanted one that was small (both in terms of a single file and in actual kloc), tested and could handle multiple data stores. And because it was fun.

Example

bitty supports the usual CRUD methods. For example::

from bitty import *

bit = Bitty('sqlite:///home/code/my_database.db')

bit.add('people', name='Claris', says='Moof!', age=37)
bit.add('people', name='John Doe', says='No comment.', age=37)

# Select all.
for row in bit.find('people'):
    print row['name']

bit.close()

See examples/ and tests.py for more usages.

Supported Backends

  • SQLite
  • Postgres
  • MySQL

Schema

You're responsible for your own schema. bitty does the smallest amount of introspection it can to get by.

When to use bitty?

bitty is best used in environments like resource-based APIs and when integrating with other software (like a bigger web framework).

Tastes great when used with itty.

Serious Python Programmers™ with Enterprise Requirements need not apply.

author: Daniel Lindsley

date: 2010-01-20

Something went wrong with that request. Please try again.