summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Kreen2008-04-22 12:41:05 +0000
committerMarko Kreen2008-04-22 12:41:05 +0000
commit64e543a6a29d8942994afec439ff57ea65ebadb1 (patch)
tree20c9e126797929574737285a3e4342dcfc663eff
parent3ff4732ef03a73f9f925dfb4903b1b0b08a99845 (diff)
python: rework imports to get better docs...
-rw-r--r--python/londiste/__init__.py35
-rw-r--r--python/londiste/compare.py2
-rw-r--r--python/londiste/table_copy.py2
-rw-r--r--python/pgq/__init__.py11
-rw-r--r--python/pgq/producer.py2
5 files changed, 42 insertions, 10 deletions
diff --git a/python/londiste/__init__.py b/python/londiste/__init__.py
index 97d67433..cd76c0df 100644
--- a/python/londiste/__init__.py
+++ b/python/londiste/__init__.py
@@ -1,12 +1,31 @@
"""Replication on top of PgQ."""
-from playback import *
-from compare import *
-from file_read import *
-from file_write import *
-from setup import *
-from table_copy import *
-from installer import *
-from repair import *
+import londiste.playback
+import londiste.compare
+import londiste.file_read
+import londiste.file_write
+import londiste.setup
+import londiste.table_copy
+import londiste.installer
+import londiste.repair
+
+from londiste.playback import *
+from londiste.compare import *
+from londiste.file_read import *
+from londiste.file_write import *
+from londiste.setup import *
+from londiste.table_copy import *
+from londiste.installer import *
+from londiste.repair import *
+
+__all__ = (
+ londiste.playback.__all__ +
+ londiste.compare.__all__ +
+ londiste.file_read.__all__ +
+ londiste.file_write.__all__ +
+ londiste.setup.__all__ +
+ londiste.table_copy.__all__ +
+ londiste.installer.__all__ +
+ londiste.repair.__all__ )
diff --git a/python/londiste/compare.py b/python/londiste/compare.py
index 0029665b..8624d7eb 100644
--- a/python/londiste/compare.py
+++ b/python/londiste/compare.py
@@ -9,7 +9,7 @@ import sys, os, time, skytools
__all__ = ['Comparator']
-from syncer import Syncer
+from londiste.syncer import Syncer
class Comparator(Syncer):
def process_sync(self, tbl, src_db, dst_db):
diff --git a/python/londiste/table_copy.py b/python/londiste/table_copy.py
index b78379d4..b02b789f 100644
--- a/python/londiste/table_copy.py
+++ b/python/londiste/table_copy.py
@@ -8,7 +8,7 @@ For internal usage.
import sys, os, skytools
from skytools.dbstruct import *
-from playback import *
+from londiste.playback import *
__all__ = ['CopyTable']
diff --git a/python/pgq/__init__.py b/python/pgq/__init__.py
index 40fb835b..bb78abc0 100644
--- a/python/pgq/__init__.py
+++ b/python/pgq/__init__.py
@@ -1,7 +1,18 @@
"""PgQ framework for Python."""
+import pgq.event
+import pgq.consumer
+import pgq.setconsumer
+import pgq.producer
+
from pgq.event import *
from pgq.consumer import *
from pgq.setconsumer import *
from pgq.producer import *
+__all__ = (
+ pgq.event.__all__ +
+ pgq.consumer.__all__ +
+ pgq.setconsumer.__all__ +
+ pgq.producer.__all__ )
+
diff --git a/python/pgq/producer.py b/python/pgq/producer.py
index 81e1ca4f..7bae722d 100644
--- a/python/pgq/producer.py
+++ b/python/pgq/producer.py
@@ -4,6 +4,8 @@
import skytools
+__all__ = ['bulk_insert_events', 'insert_event']
+
_fldmap = {
'id': 'ev_id',
'time': 'ev_time',