This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
Lurker is a tiny mysql wrapper built on the top of python-mySQLdb.

git clone git://
python install

Quick Tutorial

Connecting to the database

* with Configuration objects. (This could be preferrable for seperating environments like DevConfig, ProdConfig, TestConfig)

``` python
class DatabaseConfig(BaseLurkerConfig):
host = 'localhost'
user = 'root'
passwd = ''
db = ''

connection = Connection(DbConfig)


* without Configuration objects


connection = Connection().quick_connect("mysql_user", "mysql_passwd", "db_name", "host")


Sending Queries
``` python
# returns last_id
connection.execute("INSERT INTO table_name (name) VALUES (%s)", ['Selami Sahin', ])

# returns row count
connection.execute("UPDATE table_name SET name = %s", ["Muhittin Bosat", ])

# returns a result set
all_people = connection.get_results("SELECT * FROM people")

# returns a row
one_people = connection.get_row("SELECT * FROM people WHERE id = 1")

# server-side cursor
for person in connection.iterate("SELECT * FROM people"):
print person

Query Caching Support with Redis
* In order to activate caching support, you need to set cache and cache_information variables in your config class.

``` python
from lurker.configuration import BaseLurkerConfig
from lurker.connection import Connection
from lurker.cache.backends.redis_backend import RedisBackend

class DbConfig(BaseLurkerConfig):
host = 'localhost'
user = 'root'
passwd = 'passwd'
db = 'db_name'
cache = True
cache_information = {
'backend': RedisBackend,
'args': (),
'kwargs': {'host': 'localhost', 'port': 6379, 'db': 0},

* Usage in get_results and get_row

``` python

print connection.get_row("SELECT * FROM people WHERE id = %s", parameters=(1,), cache=30)
print connection.get_row("SELECT * FROM people WHERE id = %s", parameters=(1,), cache=30)

# output
# DEBUG:root:cache miss: SELECT * FROM people WHERE id = %s
# {'id': 1L, 'name': u'Emre Yilmaz'}
# DEBUG:root:cache hit: SELECT * FROM people WHERE id = %s
# {u'id': 1, u'name': u'Emre Yilmaz'}


Emre Yılmaz - [@emre_yilmaz](

Mirat Can Bayrak - [@mirat](

Projects/Scripts powered by lurker
- Database Copy:

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
lurker-0.1.tar.gz (4.4 kB) Copy SHA256 Checksum SHA256 Source Feb 12, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting