• Stars
    star
    138
  • Rank 264,508 (Top 6 %)
  • Language
    Python
  • Created almost 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

miniature redis-like server implemented in Python

simpledb

Miniature Redis-like database written in Python.

installing

$ pip install simpledb

Alternatively, you can install from git:

$ git clone https://github.com/coleifer/simpledb
$ cd simpledb
$ python setup.py install

running

by default, the simpledb server runs on localhost:31337.

the following options are supported:

Usage: simpledb.py [options]

Options:
  -h, --help            show this help message and exit
  -d, --debug           Log debug messages.
  -e, --errors          Log error messages only.
  -t, --use-threads     Use threads instead of gevent.
  -H HOST, --host=HOST  Host to listen on.
  -m MAX_CLIENTS, --max-clients=MAX_CLIENTS
                        Maximum number of clients.
  -p PORT, --port=PORT  Port to listen on.
  -l LOG_FILE, --log-file=LOG_FILE
                        Log file.
  -x EXTENSIONS, --extension=EXTENSIONS
                        Import path for Python extension module(s).

to run with debug logging on port 31339, for example:

$ simpledb.py -d -p 31339

docker

simpledb ships with a Dockerfile or can be pulled from dockerhub as coleifer/simpledb. The dockerfile setups up a volume at /var/lib/simpledb and exposes port 31337.

running:

$ docker run -it --rm -p 31337:31337 coleifer/simpledb

building:

$ cd simpledb/docker
$ docker build -t simpledb .
$ docker run -d -p 31337:31337 -v simpledb-logs:/var/lib/simpledb simpledb

usage

the server is capable of storing the following data-types natively:

  • strings and/or binary data
  • numerical values
  • null
  • lists (may be nested)
  • dictionaries (may be nested)
from simpledb import Client

client = Client()
client.set('key', {'name': 'Charlie', 'pets': ['mickey', 'huey']})

print(client.get('key'))
{'name': 'Charlie', 'pets': ['mickey', 'huey']}

More Repositories

1

peewee

a small, expressive orm -- supports postgresql, mysql, sqlite and cockroachdb
Python
11,103
star
2

huey

a little task queue for python
Python
5,154
star
3

sqlite-web

Web-based SQLite database browser written in Python
Python
3,359
star
4

walrus

Lightweight Python utilities for working with Redis
Python
1,149
star
5

flask-peewee

flask integration for peewee, including admin, authentication, rest api and more
Python
776
star
6

micawber

a small library for extracting rich content from urls
Python
632
star
7

unqlite-python

Python bindings for the UnQLite embedded NoSQL database
C
389
star
8

django-relationships

Descriptive relationships between auth.users (think facebook friends and twitter followers, plus more)
Python
369
star
9

scout

RESTful search server written in Python, powered by SQLite.
Python
299
star
10

pysqlite3

SQLite3 DB-API 2.0 driver from Python 3, packaged separately, with improvements
C
184
star
11

irc

tinkering with a made-from-scratch irc library in python
Python
179
star
12

django-generic-m2m

relate anything to anything
Python
153
star
13

python-lsm-db

Python bindings for the SQLite4 LSM database.
C
129
star
14

vedis-python

Python bindings for the Vedis embedded NoSQL database
C
125
star
15

wtf-peewee

WTForms integration for peewee
Python
111
star
16

sqlcipher3

Python 3 bindings for SQLCipher
C
85
star
17

sophy

Fast Python bindings to Sophia Database
C
80
star
18

django-generic-aggregation

annotate() and aggregate() for generically-related data.
Python
72
star
19

beefish

simple file encryption with pycrypto
Python
67
star
20

ucache

gametight lightweight caching library for python
Python
65
star
21

chrome-extensions

Personal collection of chrome extensions
JavaScript
61
star
22

sqlite-vtfunc

Implement SQLite table-valued functions with Python
Cython
58
star
23

sweepea

Fast, lightweight Python database toolkit for SQLite, built with Cython.
Cython
42
star
24

dot-theme

dotfile templating tools
Python
31
star
25

greendb

server frontend for lmdb
Python
25
star
26

kvkit

dank key/value store high-level APIs
Python
18
star
27

kt

Fast Python client for KyotoTycoon
Python
18
star
28

ukt

Kyoto Tycoon client library for Python.
Python
11
star
29

sqlite3-bloomfilter

Bloomfilter for SQLite3
C
6
star