Skip to content

octodb/octodb-python2

Repository files navigation

OctoDB for Python 2.7

This is a fork of pysqlite

Online documentation can be found here.

Installation

You must install some OctoDB library for this one to work. It can be either pre-compiled binaries or you can compile it by yourself. You can start with the free version.

Then run:

git clone --depth=1 https://gitlab.com/octodb/octodb-python2
cd octodb-python2
python setup.py build install

Usage

import octodb
import json
import time

conn = octodb.connect('file:app.db?node=secondary&connect=tcp://server:port')

# check if the db is ready
while True:
    result = conn.cursor().execute("PRAGMA sync_status").fetchone()
    status = json.loads(result[0])
    if status["db_is_ready"]: break
    time.sleep(0.250)

# now we can use the db connection
...

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages