diff --git a/CHANGES.txt b/CHANGES.txt new file mode 100644 index 00000000..eedb82c2 --- /dev/null +++ b/CHANGES.txt @@ -0,0 +1,8 @@ +v0.01, 9/11/2013 -- Initial Release +v0.01.1, 9/30/2013 -- Fixing problems with build :( +v0.01.2, 9/30/2013 -- Fixing problems with build :( +v0.01.3, 9/30/2013 -- Fixing problems with build :( +v0.1.4, 9/30/2013 -- Still working on getting around README.md errors +v0.1.5, 10/2/2013 -- Still working on build problems +v0.1.6, 10/2/2013 -- Still working on build problems +v0.1.7, 10/2/2013 -- still working on build problems diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 00000000..6eb99b0d --- /dev/null +++ b/MANIFEST @@ -0,0 +1,12 @@ +# file GENERATED by distutils, do NOT edit +CHANGES.txt +README.txt +setup.py +pydruid +pydruid/__init__.py +pydruid/client.py +pydruid/utils/__init__.py +pydruid/utils/aggregators.py +pydruid/utils/filters.py +pydruid/utils/postaggregator.py +pydruid/utils/query_utils.py diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 00000000..056aef99 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,4 @@ +include *.txt +include *.md +recursive-include docs *.txt +global-include pydruid *.py diff --git a/README.md b/README.md deleted file mode 100644 index a26d9e76..00000000 --- a/README.md +++ /dev/null @@ -1,6 +0,0 @@ -pydruid -======= - -A Python connector for Druid - -This is a side project that needs some love! diff --git a/README.txt b/README.txt new file mode 100644 index 00000000..de43975a --- /dev/null +++ b/README.txt @@ -0,0 +1,27 @@ +=========== +pyDruid +=========== + +pyDruid provides a python interface to the Druid analytic store. Typical usage +often looks like this:: + + #!/usr/bin/env python + + from pydruid.client import * + + # Druid Config + endpoint = 'druid/v2/?pretty' + demo_bard_url = 'http://localhost:8083' + dataSource = 'wikipedia' + intervals = ["2013-01-01/p1y"] + + query = pyDruid(demo_bard_url, endpoint) + + counts = query.timeseries(dataSource = dataSource, + granularity = "minute", + intervals = intervals, + aggregations = {"count" : doubleSum("edits")} + ) + + print counts + [{'timestamp': '2013-09-30T23:31:00.000Z', 'result': {'count': 0.0}}, {'timestamp': '2013-09-30T23:32:00.000Z', 'result': {'count': 0.0}}, {'timestamp': '2013-09-30T23:33:00.000Z', 'result': {'count': 0.0}}, {'timestamp': '2013-09-30T23:34:00.000Z', 'result': {'count': 0.0}}] diff --git a/__init__.py b/pydruid/__init__.py similarity index 100% rename from __init__.py rename to pydruid/__init__.py diff --git a/pyDruid.py b/pydruid/client.py similarity index 97% rename from pyDruid.py rename to pydruid/client.py index 51207f27..3a2bc840 100755 --- a/pyDruid.py +++ b/pydruid/client.py @@ -24,10 +24,10 @@ import dateutil.parser from matplotlib import * from matplotlib.pyplot import * -from pyDruidUtils.aggregators import * -from pyDruidUtils.postaggregator import * -from pyDruidUtils.filters import * -from pyDruidUtils.query_utils import * +from utils.aggregators import * +from utils.postaggregator import * +from utils.filters import * +from utils.query_utils import * class pyDruid: diff --git a/pyDruidUtils/__init__.py b/pydruid/utils/__init__.py similarity index 100% rename from pyDruidUtils/__init__.py rename to pydruid/utils/__init__.py diff --git a/pyDruidUtils/aggregators.py b/pydruid/utils/aggregators.py similarity index 100% rename from pyDruidUtils/aggregators.py rename to pydruid/utils/aggregators.py diff --git a/pyDruidUtils/filters.py b/pydruid/utils/filters.py similarity index 100% rename from pyDruidUtils/filters.py rename to pydruid/utils/filters.py diff --git a/pyDruidUtils/postaggregator.py b/pydruid/utils/postaggregator.py similarity index 100% rename from pyDruidUtils/postaggregator.py rename to pydruid/utils/postaggregator.py diff --git a/pyDruidUtils/query_utils.py b/pydruid/utils/query_utils.py similarity index 100% rename from pyDruidUtils/query_utils.py rename to pydruid/utils/query_utils.py diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..923dda81 --- /dev/null +++ b/setup.py @@ -0,0 +1,19 @@ +from setuptools import setup + +setup( + name='pyDruid', + version='0.1.7', + author='Deep Ganguli', + author_email='deep@metamarkets.com', + packages=['pydruid', 'pydruid.utils'], + url='http://pypi.python.org/pypi/pyDruid/', + license='LICENSE', + description='Druid analytical data-store Python library', + long_description=open('README.txt').read(), + install_requires=[ + "pandas >= 0.12", + "simplejson >= 3.3.0", + "matplotlib >= 1.3.0", + "numpy >= 1.7.1" + ], +) \ No newline at end of file