wiki:Tentacles
Last modified 3 years ago Last modified on 06/11/11 23:27:06

Tentacles

Introduction

/resources/tentacles/tentacle-min.png

Tentacles is a Object-Relational Mapping (ORM) written in Python.
It's main concept is to manipulate stored datas as you do for python data structures.

Example

>>> from tentacles import Storage, Object, fields, filter
>>> db = Storage('sqlite3::memory:')

>>> class SuperHero(Object):
>>>   name   = String()
>>>   gender = String()
>>>   power  = String()
>>>  
>>> hero = SuperHero(name='superman', gender='male', power='fly')
>>> print "%s can %s" % (hero.name, hero.power)
superman can fly

>>> hero.save()

>>> heros = filter(lambda e: e.gender == 'male', SuperHero)
>>> for h in heros:
>>>   print h.name
superman

Documentation

  • coming soon

Changes

  • 0.1.0 - initial release
    • natural "python language" ORM
    • sqlite3 backend storage
    • object definition
    • o2m and m2m relations
    • "basic queries" syntax
  • 0.1.1 - reblok compatibility & unittests
    • compatibility with reblok 0.1.1 (new TUPLE opcode)
    • add unittests

TODO

Download

Contact

Tentacles is written by Guillaume Bour <guillaume@…>

License

Tentacles is distributed under GNU GPL v3 License.