mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-14 21:43:01 +00:00
s/multiuser/jupyterhub
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# http://travis-ci.org/#!/jupyter/multiuser-server
|
||||
# http://travis-ci.org/#!/jupyter/jupyterhub
|
||||
language: python
|
||||
python:
|
||||
- 3.4
|
||||
@@ -10,4 +10,4 @@ before_install:
|
||||
- time sudo apt-get install libzmq3-dev
|
||||
- time pip install -f https://nipy.bic.berkeley.edu/wheelhouse/travis -r requirements.txt -r dev-requirements.txt
|
||||
script:
|
||||
- py.test multiuser
|
||||
- py.test jupyterhub
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Multi-user server for Jupyter notebooks
|
||||
# JupyterHub: A multi-user server for Jupyter notebooks
|
||||
|
||||
This repo hosts the development of a multi-user server to manage and proxy multiple instances of the single-user IPython notebook server.
|
||||
This repo hosts the development of a multi-user server to manage and proxy multiple instances of the single-user <del>IPython</del> Jupyter notebook server.
|
||||
|
||||
Three actors:
|
||||
|
||||
@@ -22,7 +22,7 @@ Basic principals:
|
||||
|
||||
## to use
|
||||
|
||||
$> python -m multiuser
|
||||
$> python -m jupyterhub
|
||||
|
||||
visit `http://localhost:8000`, and login (any username, password=`password`).
|
||||
|
||||
|
@@ -31,8 +31,8 @@ from .handlers import (
|
||||
from . import db
|
||||
from .utils import url_path_join
|
||||
|
||||
class MultiUserApp(Application):
|
||||
"""An Application for starting the Multi-User Notebook server."""
|
||||
class JupyterHubApp(Application):
|
||||
"""An Application for starting a Multi-User Notebook server."""
|
||||
ip = Unicode('localhost', config=True,
|
||||
help="The public facing ip of the proxy"
|
||||
)
|
||||
@@ -88,7 +88,7 @@ class MultiUserApp(Application):
|
||||
return b'secret!'
|
||||
|
||||
# class for spawning single-user servers
|
||||
spawner_class = DottedObjectName("multiuser.spawner.LocalProcessSpawner")
|
||||
spawner_class = DottedObjectName("jupyterhub.spawner.LocalProcessSpawner")
|
||||
|
||||
db_url = Unicode('sqlite:///:memory:', config=True)
|
||||
debug_db = Bool(False)
|
||||
@@ -215,7 +215,7 @@ class MultiUserApp(Application):
|
||||
self.tornado_application = web.Application(self.handlers, **self.tornado_settings)
|
||||
|
||||
def initialize(self, *args, **kwargs):
|
||||
super(MultiUserApp, self).initialize(*args, **kwargs)
|
||||
super(JupyterHubApp, self).initialize(*args, **kwargs)
|
||||
self.init_db()
|
||||
self.init_hub()
|
||||
self.init_proxy()
|
||||
@@ -247,7 +247,7 @@ class MultiUserApp(Application):
|
||||
finally:
|
||||
self.cleanup()
|
||||
|
||||
main = MultiUserApp.launch_instance
|
||||
main = JupyterHubApp.launch_instance
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@@ -53,7 +53,7 @@ class Spawner(LoggingConfigurable):
|
||||
)
|
||||
def _cmd_default(self):
|
||||
# should have sudo -u self.user
|
||||
return [sys.executable, '-m', 'multiuser.singleuser']
|
||||
return [sys.executable, '-m', 'jupyterhub.singleuserapp']
|
||||
|
||||
@classmethod
|
||||
def fromJSON(cls, state, **kwargs):
|
@@ -6,7 +6,7 @@
|
||||
from sqlalchemy.orm import sessionmaker, relationship, backref
|
||||
from sqlalchemy import create_engine
|
||||
|
||||
from multiuser import db
|
||||
from .. import db
|
||||
|
||||
try:
|
||||
unicode
|
@@ -1,16 +0,0 @@
|
||||
import json
|
||||
|
||||
from tornado import web
|
||||
from tornado.escape import xhtml_escape
|
||||
|
||||
class HeadersHandler(web.RequestHandler):
|
||||
def get(self):
|
||||
headers = {}
|
||||
for key, value in self.request.headers.items():
|
||||
if ';' in value:
|
||||
value = [ s.strip() for s in value.split(';') ]
|
||||
headers[key] = value
|
||||
self.write("<pre>%s</pre>" % (
|
||||
xhtml_escape(json.dumps(headers, indent=1))
|
||||
))
|
||||
|
@@ -1,16 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Single User: {{user}}</title>
|
||||
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var ws = new WebSocket("ws://" + location.host + "{{base_url}}ws");
|
||||
ws.onmessage = function (msg) {
|
||||
$("#messages").append($("<div/>").text(msg.data));
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div>single user {{user}}: {{uri}}</div>
|
||||
<div id="messages"></div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user