From cbf73d3a70b97f17f1f5431eee1e73dbc56a7f8e Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Fri, 20 Mar 2015 06:15:50 +0100 Subject: [PATCH] Added some convenient __all__ imports. --- didex/__init__.py | 3 +++ didex/db.py | 2 ++ didex/index.py | 2 ++ didex/store.py | 2 ++ didex/values.py | 2 ++ 5 files changed, 11 insertions(+) diff --git a/didex/__init__.py b/didex/__init__.py index e69de29..6e48809 100644 --- a/didex/__init__.py +++ b/didex/__init__.py @@ -0,0 +1,3 @@ +from .index import * +from .store import * +from .values import * diff --git a/didex/db.py b/didex/db.py index 316fa02..7435166 100644 --- a/didex/db.py +++ b/didex/db.py @@ -2,6 +2,8 @@ import time, threading, struct from . import lib from bsddb3 import db as bd +__all__ = ["environment", "database"] + deadlock = bd.DBLockDeadlockError class environment(lib.closable): diff --git a/didex/index.py b/didex/index.py index 4d42506..a2828ce 100644 --- a/didex/index.py +++ b/didex/index.py @@ -2,6 +2,8 @@ import struct, contextlib, math from . import db, lib from .db import bd, txnfun +__all__ = ["maybe", "t_int", "t_uint", "t_float", "t_str", "ordered"] + deadlock = bd.DBLockDeadlockError notfound = bd.DBNotFoundError diff --git a/didex/store.py b/didex/store.py index fb5f2c6..8008ee5 100644 --- a/didex/store.py +++ b/didex/store.py @@ -2,6 +2,8 @@ import threading, pickle from . import db, index, cache from .db import txnfun +__all__ = ["environment", "store", "autostore"] + class environment(object): def __init__(self, *, path=None, getpath=None, recover=False): if path is not None: diff --git a/didex/values.py b/didex/values.py index 0e7bddc..090edd4 100644 --- a/didex/values.py +++ b/didex/values.py @@ -2,6 +2,8 @@ import threading from . import store, lib from .store import storedesc +__all__ = ["simple", "multi"] + class cursor(lib.closable): def __init__(self, bk, st): self.bk = bk -- 2.11.0