forked from litaotao/IPython-Dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start build dashboard server and client, will update readme meantime
- Loading branch information
Showing
28 changed files
with
147 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# build directory | ||
|
||
build | ||
dist | ||
IPython_Dashboard.egg-info | ||
|
||
# pyc files | ||
*.pyc | ||
*.pyo | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
recursive-include dashboard/template * | ||
recursive-include dashboard/static * | ||
include *.in | ||
include *.md | ||
include *.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
|
||
# redis | ||
redis_host = 'localhost' | ||
redis_port = 6379 | ||
redis_db = 0 | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# built-in package | ||
|
||
# third-parth package | ||
import redis | ||
from flask import Flask | ||
|
||
# user-defined package | ||
import config | ||
|
||
''' | ||
dashboard server setup | ||
''' | ||
app = Flask(__name__) | ||
|
||
|
||
|
||
|
||
''' | ||
dashboard common services setup | ||
''' | ||
r = redis.Redis(host=config.redis_host, port=config.redis_port, db=config.redis_db) | ||
|
||
|
||
# import modules | ||
import client, server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import sender |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# built-in package | ||
|
||
# third-parth package | ||
|
||
# user-defined package | ||
from dashboard import r | ||
|
||
|
||
def sender(obj, key, value=""): | ||
"""Send an object to storage[redis]. key is the obj name, | ||
value is the serialized object[a dict most of the time] | ||
Args: | ||
obj: unserialized-obj need persistent in storage, currently using redis. | ||
the object maybe [pandas.DataFrame, matplotlib.plt.plot, dict]; | ||
key: option, key to store in storage; | ||
value: option, value to store in storage; | ||
""" | ||
# persistent key and value | ||
value = value if value else obj.to_dict() | ||
|
||
return r.set(key, value) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
|
||
# redis | ||
redis_host = 'localhost' | ||
redis_port = 6379 | ||
redis_db = 0 | ||
|
||
|
||
|
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from dashboard import app | ||
|
||
app.run(debug=True, port=9090) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import os | ||
import io | ||
from setuptools import find_packages, setup | ||
|
||
|
||
setup( | ||
name="IPython-Dashboard", | ||
version='0.1.0', | ||
author="Taotao Li", | ||
author_email="[email protected]", | ||
url="http://litaotao.github.io", | ||
license="BSD", | ||
packages=find_packages(), | ||
package_dir={"dashboard": "dashboard"}, | ||
include_package_data=True, | ||
description="An stand alone, light-weight web server for building, sharing graphs in created in ipython. Let ipython do what it focus, let this do what everyone needs for building a interactive, collaborated and real-time streaming dashboards.", | ||
long_description=io.open("README.md", encoding='utf8').read(), | ||
install_requires=io.open("requirements.txt", encoding='utf8').read(), | ||
classifiers=['Intended Audience :: Science/Research', | ||
'Intended Audience :: Developers', | ||
'Programming Language :: Python', | ||
'Topic :: Software Development', | ||
'Topic :: Scientific/Engineering', | ||
'Operating System :: Microsoft :: Windows', | ||
'Operating System :: POSIX', | ||
'Operating System :: Unix', | ||
'Operating System :: MacOS', | ||
'Programming Language :: Python :: 2', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.3'], | ||
zip_safe=False, | ||
entry_points={ | ||
'console_scripts': [ | ||
] | ||
} | ||
) | ||
|