semvec/pypi-packages huggingface dataset:
skylark 0.9.1
A micro python orm for mysql and sqlite.
License: BSD
Keywords: orm mysql sqlite tiny micro database

skylark
-------

A micro python orm for mysql and sqlite.

Sample Usage
````````````

.. code:: python

    >>> from models import User
    >>> user = User(name='Tom', email='tom@gmail.com')
    >>> user.save()  # insert
    1
    >>> user.email = 'tom@github.com'
    >>> user.save()  # update
    1
    >>> [user.name for user in User.select()]  # select
    [u'Tom']
    >>> query = User.where(name='Tom').delete()
    >>> query.execute()  # delete
    1
    >>> user = User.create(name='Kate', email='kate@gmail.com')  # another insert
    >>> user
    {'email': 'kate@gmail.com', 'name': 'Kate', 'id': 2}
    >>> user.destroy()  # another delete
    1

Installation
````````````

.. code:: bash

    $ pip install skylark

Links
`````

* `Documentation <http://skylark.readthedocs.org/>`_
* `Code on Github <https://github.com/hit9/skylark>`_

**NOTICE**: skylark may not be stable before version 1.0
redis_wrap 1.4.5
Implements a wrapper for Redis datatypes so they mimic the datatypes found in Python.
License: BSD
Keywords: redis wrapper

redis_wrap
---------------

Implements a wrapper for Redis datatypes so they mimic the datatypes found in Python.

Requires Redis 2.0+ and newest version of redis-py.

For best performance the wrappers are lazy and use direct Redis calls.
E.g. __len__ of list wrapper is implemented by calling llen.

redis-py can be downloaded from here:
* http://github.com/andymccurdy/redis-py

Examples
----------

Example of list wrapper::

    bears = get_list('bears')
    bears.append('grizzly')
    assert len(bears) == 1
    assert 'grizzly' in bears

Example of hash wrapper::

    villains = get_hash('villains')
    assert 'riddler' not in villains

    villains['riddler'] = 'Edward Nigma'
    assert 'riddler' in villains

    assert len(villains.keys()) == 1

    del villains['riddler']
    assert len(villains) == 0

Example of set wrapper::

    fishes = get_set('fishes')
    assert 'nemo' not in fishes

    fishes.add('nemo')
    assert 'nemo' in fishes

    for item in fishes:
        assert item == 'nemo'

Copyright: 2010 by amix
License: BSD.