Skip to content

Commit

Permalink
Merge pull request #1 from rjurney/master
Browse files Browse the repository at this point in the history
Convert pydruid project into a pypi package
  • Loading branch information
dganguli authored and dganguli committed Oct 3, 2013
2 parents 35cd39e + 5fb737e commit 33ad3a2
Show file tree
Hide file tree
Showing 13 changed files with 74 additions and 10 deletions.
8 changes: 8 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include *.txt
include *.md
recursive-include docs *.txt
global-include pydruid *.py
6 changes: 0 additions & 6 deletions README.md

This file was deleted.

27 changes: 27 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -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}}]
File renamed without changes.
8 changes: 4 additions & 4 deletions pyDruid.py → pydruid/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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"
],
)

0 comments on commit 33ad3a2

Please sign in to comment.