Skip to content
/ aiossdb Public
forked from Microndgt/aiossdb

aiossdb is a library for accessing a ssdb database from the asyncio

Notifications You must be signed in to change notification settings

forbxy/aiossdb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aiossdb

aiossdb is a library for accessing a ssdb database from the asyncio

Coverage Status https://travis-ci.org/Microndgt/aiossdb.svg?branch=master

Requirements

  • Python 3.5+

DONE and TODO

  • base async ssdb connection
  • ssdb parser
  • ssdb async connection pool
  • easy using ssdb client
  • tests
  • releasing...
  • and more...

Quick Start

import asyncio
from aiossdb import create_connection, ReplyError


loop = asyncio.get_event_loop()


@asyncio.coroutine
def connect_tcp():
    conn = yield from create_connection(('localhost', 8888), encoding='utf-8')
    try:
        val = yield from conn.auth('f')
    except ReplyError as e:
        print(e)
    else:
        print(val)
        yield from conn.execute('set', 'a', 2)
        val = yield from conn.execute('hget', 'hash_name', 'hash_key')
        print(val)

    conn.close()

loop.run_until_complete(connect_tcp())
loop.close()

Exceptions

  • SSDBError
    • ConnectionClosedError
    • ReplyError
    • ProtocolError

NOTES

  • The preliminary test shows that aiossdb is 25 times fast than pyssdb

About

aiossdb is a library for accessing a ssdb database from the asyncio

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%