-
Notifications
You must be signed in to change notification settings - Fork 0
Server 0.4
To create a new account, first creat a connection to the private server or cloud:
server = bokeh.Server() # defaults to http://localhost:5006
server = bokeh.Cloud() # defaults to https://bokehplots.com
Then:
server.register(email, username, quiet=False)
register()
is meant to be used interactively and not in a script.
It outputs instructions, perhaps with a URL to login to the web
site of the plot server and obtain an API key.
For local plot server operation, without an api key:
server = bokeh.plotting.output_server('http://localhost:5006')
For authenticated plot server mode:
bokeh.plotting.output_server("https://foo.bar", apikey)
To use the cloud service, this is still just the plot server but hosted at bokehplots.com:
bokeh.plotting.output_cloud(apikey, plotname, url="http://bokehplots.com")
# If .bokeh/cloud.cfg defines apikey, then just:
bokeh.plotting.output_cloud(plotname)
To sign in using the object-oriented interface:
server = bokeh.Cloud(apikey) # can be omitted if defined in config file
server = bokeh.Server(apikey)
- server.plots() -> plot document names
- server.data() -> Should this return just datasource names or objects?
- server.DataSource(**data) -> RemoteDataSource object
- RemoteDataSource:
- columns()
- remove()
- add()
- commit() / update() / ??
- Backbone object persistence layer
/register
POST args: email, username
All API methods require an API key:
-
/[user_id]/plots
-> lists plot ID-
/bokeh/userinfo
sort of serves this function/
-
-
/[user_id]/plots/[plotid]
-> returns objects of scene graph-
/bokeh/bb/[docid]
is equivalent
-
-
/[user_id]/plots/[plotid]/data
-> returns datasource object IDs (but not data) -
/[user_id]/objects/[objid]
-> returns JSON of particular object, including data-
/bokeh/bb/[docid]/[typename]/[objid]
is equivalent
-
-
/[user_id]/objects/[oid1],[oid2],...,[oid_N]
- we only currently have the ability to manage objects by one id, or all of the same type, or all from one document. we don't have bulk id capabilities in urls
-
/[user_id]/data/[objid]
-> returns summary of datasource: column names & hashes /[user_id]/data/[objid]?[QUERYSTRING]
/[user_id]/data/[objid]?full
/[user_id]/store
-
/[user_id]/delete
-> optional delete full graph, optional force delete of data or delete data if no other refs
Object management:
-
/[user_id]/gc/orphans
-> returns IDs of orphaned objects -
/[user_id]/gc/run
-> runs the GC on this account-
/bokeh/bb/[docid]/rungc
is equivalent
-
- (Eventually have a separate data upload API?)
-
/[user_id]/clone
?
Account Management:
All handled through web page.
- Home page
- account verification / register
- Current plots
- Current data
- API key management
-
/plots/[plotid]/show
-> displays plot for given apikey and plot id
All config files are located in ~/.bokeh/
.
-
config
: General configuration -
cloud.cfg
: URL, username, and API key(s) -
servers.cfg
: Credentials for other servers
The reason to separate the authentication config files is so that we can ask people to post their bokeh config files on public mailing lists for debugging, without worrying that they will be leaking auth information. The reason fpr separating the cloud.cfg from the servers.cfg is so that we can update and modify the default cloud config file without messing up any custom server settings a user may have set up. (And vice versa: they can be instructed to modify their servers.cfg without messing up their ability to use the cloud service.)
The server has three persistence backends:
- Local python
- Local Redis
- Azure
Note that anyone should be able to fire up the Azure-backed server with their own credentials, and create a clone of the bokehplots.com service.
- Build local python (non-redis) plot server
- Implement user-less Azure plot storage server, ignore API keys
- Add API keys & permissions model
- Add user accounts & basic pages for creating them
- Gloss & theming of public service; real certs, use real SMTP service for verification emails, etc.