eve_panel package

Submodules

eve_panel.auth module

auth module

Authentication and Authorization handling

eve_panel.domain module

eve_panel.eve_client module

Eve client

Client for single or multiple Eve APIs.

class eve_panel.eve_client.EveClient(name=String)[source]

Bases: eve_panel.eve_model.EveModelBase

Attributes
gui
logged_in
resource_tree
resources
servers
session
sub_resources

Methods

debug(**kwargs)

Inspect .param.debug method for the full docstring

defaults(**kwargs)

Inspect .param.defaults method for the full docstring

force_new_dynamic_value(**kwargs)

Inspect .param.force_new_dynamic_value method for the full docstring

get_param_values(**kwargs)

Inspect .param.get_param_values method for the full docstring

get_value_generator(**kwargs)

Inspect .param.get_value_generator method for the full docstring

inspect_value(**kwargs)

Inspect .param.inspect_value method for the full docstring

message(**kwargs)

Inspect .param.message method for the full docstring

params(**kwargs)

Inspect .param.params method for the full docstring

print_param_defaults(*args, **kwargs)

Inspect .param.print_param_defaults method for the full docstring

print_param_values(**kwargs)

Inspect .param.print_param_values method for the full docstring

script_repr([imports, prefix])

Deprecated variant of __repr__ designed for generating a runnable script.

set_default(*args, **kwargs)

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn(**kwargs)

Inspect .param.set_dynamic_time_fn method for the full docstring

set_param(**kwargs)

Inspect .param.set_param method for the full docstring

state_pop()

Restore the most recently saved state.

state_push()

Save this instance's state.

verbose(**kwargs)

Inspect .param.verbose method for the full docstring

warning(**kwargs)

Inspect .param.warning method for the full docstring

clone

collect_resource_tree

from_app

from_domain_def

from_server

get_server_url

login

logout

make_panel

panel

pprint

propagate

select_server

servable

set_auth

set_credentials

set_server_url

set_token

show

collect_resource_tree(sort=True)[source]
classmethod from_app(app, **kwargs)[source]
classmethod from_domain_def(domain_def, name='EveApp', session=None, auth_scheme=None, servers={}, sort_by_url=False)[source]
classmethod from_server(url, **kwargs)[source]
get_server_url(name)[source]
property logged_in
login(*args, **kwargs)[source]
logout()[source]
make_panel(show_client=True, tabs_location='above')[source]
name = 'EveClient'
property resource_tree
property resources
select_server(name=None)[source]
property servers
session = None
set_auth(name)[source]
set_credentials(**credentials)[source]
set_server_url(**kwargs)[source]
set_token(token)[source]
property sub_resources

eve_panel.eve_model module

Eve model

Base classes for objects that represent Eve models.

class eve_panel.eve_model.DefaultLayout(*objects, **params)[source]

Bases: panel.layout.grid.GridBox

Attributes
aspect_ratio
background
css_classes
height
max_height
max_width
min_height
min_width
nrows
sizing_mode

Methods

app([notebook_url, port])

Displays a bokeh server app inline in the notebook.

append(obj)

Appends an object to the layout.

clear()

Clears the objects on this layout.

clone(*objects, **params)

Makes a copy of the layout sharing the same parameters.

controls([parameters, jslink])

Creates a set of widgets which allow manipulating the parameters on this instance.

debug(**kwargs)

Inspect .param.debug method for the full docstring

defaults(**kwargs)

Inspect .param.defaults method for the full docstring

embed([max_states, max_opts, json, ...])

Renders a static version of a panel in a notebook by evaluating the set of states defined by the widgets in the model.

extend(objects)

Extends the objects on this layout with a list.

force_new_dynamic_value(**kwargs)

Inspect .param.force_new_dynamic_value method for the full docstring

get_param_values(**kwargs)

Inspect .param.get_param_values method for the full docstring

get_root([doc, comm, preprocess])

Returns the root model and applies pre-processing hooks

get_value_generator(**kwargs)

Inspect .param.get_value_generator method for the full docstring

insert(index, obj)

Inserts an object in the layout at the specified index.

inspect_value(**kwargs)

Inspect .param.inspect_value method for the full docstring

jscallback([args])

Allows defining a JS callback to be triggered when a property changes on the source object.

jslink(target[, code, args, bidirectional])

Links properties on the source object to those on the target object in JS code.

link(target[, callbacks, bidirectional])

Links the parameters on this object to attributes on another object in Python.

message(**kwargs)

Inspect .param.message method for the full docstring

params(**kwargs)

Inspect .param.params method for the full docstring

pop(index)

Pops an item from the layout by index.

pprint()

Prints a compositional repr of the class.

print_param_defaults(*args, **kwargs)

Inspect .param.print_param_defaults method for the full docstring

print_param_values(**kwargs)

Inspect .param.print_param_values method for the full docstring

remove(obj)

Removes an object from the layout.

reverse()

Reverses the objects in the layout.

save(filename[, title, resources, template, ...])

Saves Panel objects to file.

script_repr([imports, prefix])

Deprecated variant of __repr__ designed for generating a runnable script.

select([selector])

Iterates over the Viewable and any potential children in the applying the Selector.

servable([title, location, area])

Serves the object if in a panel serve context and returns the Panel object to allow it to display itself in a notebook context. :param title: A string title to give the Document (if served as an app) :type title: str :param location: Whether to create a Location component to observe and set the URL location. :type location: boolean or panel.io.location.Location :param area: The area of a template to add the component too. Only has an effect if pn.config.template has been set. :type area: str.

server_doc([doc, title, location])

Returns a serveable bokeh Document with the panel attached

set_default(*args, **kwargs)

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn(**kwargs)

Inspect .param.set_dynamic_time_fn method for the full docstring

set_param(**kwargs)

Inspect .param.set_param method for the full docstring

show([title, port, address, ...])

Starts a Bokeh server and displays the Viewable in a new tab.

state_pop()

Restore the most recently saved state.

state_push()

Save this instance's state.

verbose(**kwargs)

Inspect .param.verbose method for the full docstring

warning(**kwargs)

Inspect .param.warning method for the full docstring

name = 'DefaultLayout'
ncols = 5
width = 1000
class eve_panel.eve_model.EveModelBase(name=String)[source]

Bases: param.parameterized.Parameterized

Attributes
gui

Methods

debug(**kwargs)

Inspect .param.debug method for the full docstring

defaults(**kwargs)

Inspect .param.defaults method for the full docstring

force_new_dynamic_value(**kwargs)

Inspect .param.force_new_dynamic_value method for the full docstring

get_param_values(**kwargs)

Inspect .param.get_param_values method for the full docstring

get_value_generator(**kwargs)

Inspect .param.get_value_generator method for the full docstring

inspect_value(**kwargs)

Inspect .param.inspect_value method for the full docstring

message(**kwargs)

Inspect .param.message method for the full docstring

params(**kwargs)

Inspect .param.params method for the full docstring

print_param_defaults(*args, **kwargs)

Inspect .param.print_param_defaults method for the full docstring

print_param_values(**kwargs)

Inspect .param.print_param_values method for the full docstring

script_repr([imports, prefix])

Deprecated variant of __repr__ designed for generating a runnable script.

set_default(*args, **kwargs)

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn(**kwargs)

Inspect .param.set_dynamic_time_fn method for the full docstring

set_param(**kwargs)

Inspect .param.set_param method for the full docstring

state_pop()

Restore the most recently saved state.

state_push()

Save this instance's state.

verbose(**kwargs)

Inspect .param.verbose method for the full docstring

warning(**kwargs)

Inspect .param.warning method for the full docstring

clone

make_panel

panel

pprint

propagate

servable

show

clone(**kwargs)[source]
property gui
make_panel()[source]
max_height = 400
max_width = 1000
name = 'EveModelBase'
panel()[source]
propagate(**kwargs)[source]
servable()[source]
show()[source]
sizing_mode = 'stretch_width'

eve_panel.field module

eve_panel.field.EveField(name, schema, klass)[source]

eve_panel.http_client module

eve_panel.item module

class eve_panel.item.EveItem(name=String)[source]

Bases: eve_panel.eve_model.EveModelBase

Attributes
gui
session
url

Methods

debug(**kwargs)

Inspect .param.debug method for the full docstring

defaults(**kwargs)

Inspect .param.defaults method for the full docstring

force_new_dynamic_value(**kwargs)

Inspect .param.force_new_dynamic_value method for the full docstring

get_param_values(**kwargs)

Inspect .param.get_param_values method for the full docstring

get_value_generator(**kwargs)

Inspect .param.get_value_generator method for the full docstring

inspect_value(**kwargs)

Inspect .param.inspect_value method for the full docstring

message(**kwargs)

Inspect .param.message method for the full docstring

params(**kwargs)

Inspect .param.params method for the full docstring

print_param_defaults(*args, **kwargs)

Inspect .param.print_param_defaults method for the full docstring

print_param_values(**kwargs)

Inspect .param.print_param_values method for the full docstring

script_repr([imports, prefix])

Deprecated variant of __repr__ designed for generating a runnable script.

set_default(*args, **kwargs)

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn(**kwargs)

Inspect .param.set_dynamic_time_fn method for the full docstring

set_param(**kwargs)

Inspect .param.set_param method for the full docstring

state_pop()

Restore the most recently saved state.

state_push()

Save this instance's state.

verbose(**kwargs)

Inspect .param.verbose method for the full docstring

warning(**kwargs)

Inspect .param.warning method for the full docstring

all_versions

buttons

clone

delete

from_schema

get_version

items

keys

make_panel

panel

patch

pprint

propagate

pull

push

save

servable

show

to_dict

to_json

to_record

values

version_diffs

all_versions()[source]
buttons()[source]
delete(verification=None)[source]
classmethod from_schema(name, schema, resource_url, session=None, data={})[source]
get_version(version)[source]
items()[source]
keys()[source]
make_panel()[source]
name = 'EveItem'
patch(*fields)[source]
pull()[source]
push()[source]
save()[source]
session = None
to_dict()[source]
to_json()[source]
to_record(exclude_files=True)[source]
property url
values()[source]
version_diffs()[source]

eve_panel.page module

class eve_panel.page.EvePage(name=String)[source]

Bases: eve_panel.eve_model.EveModelBase

Attributes
df
gui

Methods

debug(**kwargs)

Inspect .param.debug method for the full docstring

defaults(**kwargs)

Inspect .param.defaults method for the full docstring

force_new_dynamic_value(**kwargs)

Inspect .param.force_new_dynamic_value method for the full docstring

get_param_values(**kwargs)

Inspect .param.get_param_values method for the full docstring

get_value_generator(**kwargs)

Inspect .param.get_value_generator method for the full docstring

inspect_value(**kwargs)

Inspect .param.inspect_value method for the full docstring

message(**kwargs)

Inspect .param.message method for the full docstring

params(**kwargs)

Inspect .param.params method for the full docstring

print_param_defaults(*args, **kwargs)

Inspect .param.print_param_defaults method for the full docstring

print_param_values(**kwargs)

Inspect .param.print_param_values method for the full docstring

script_repr([imports, prefix])

Deprecated variant of __repr__ designed for generating a runnable script.

set_default(*args, **kwargs)

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn(**kwargs)

Inspect .param.set_dynamic_time_fn method for the full docstring

set_param(**kwargs)

Inspect .param.set_param method for the full docstring

state_pop()

Restore the most recently saved state.

state_push()

Save this instance's state.

verbose(**kwargs)

Inspect .param.verbose method for the full docstring

warning(**kwargs)

Inspect .param.warning method for the full docstring

clone

items

json_view

keys

make_panel

panel

pprint

propagate

pull

push

records

servable

show

table_view

to_dataframe

to_file

to_json

to_records

values

widgets_view

property df
fields = ['_id']
items()[source]
json_view()[source]
keys()[source]
make_panel()[source]
name = 'EvePage'
pull(names=None)[source]
push(names=None)[source]
records()[source]
table_view()[source]
to_dataframe()[source]
to_file(indent=4)[source]
to_json()[source]
to_records()[source]
values()[source]
widgets_view()[source]
class eve_panel.page.EvePageCache(name=String)[source]

Bases: param.parameterized.Parameterized

Methods

debug(**kwargs)

Inspect .param.debug method for the full docstring

defaults(**kwargs)

Inspect .param.defaults method for the full docstring

force_new_dynamic_value(**kwargs)

Inspect .param.force_new_dynamic_value method for the full docstring

get_param_values(**kwargs)

Inspect .param.get_param_values method for the full docstring

get_value_generator(**kwargs)

Inspect .param.get_value_generator method for the full docstring

inspect_value(**kwargs)

Inspect .param.inspect_value method for the full docstring

message(**kwargs)

Inspect .param.message method for the full docstring

params(**kwargs)

Inspect .param.params method for the full docstring

print_param_defaults(*args, **kwargs)

Inspect .param.print_param_defaults method for the full docstring

print_param_values(**kwargs)

Inspect .param.print_param_values method for the full docstring

script_repr([imports, prefix])

Deprecated variant of __repr__ designed for generating a runnable script.

set_default(*args, **kwargs)

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn(**kwargs)

Inspect .param.set_dynamic_time_fn method for the full docstring

set_param(**kwargs)

Inspect .param.set_param method for the full docstring

state_pop()

Restore the most recently saved state.

state_push()

Save this instance's state.

verbose(**kwargs)

Inspect .param.verbose method for the full docstring

warning(**kwargs)

Inspect .param.warning method for the full docstring

get

items

keys

pop

pprint

values

get(key, fallback=None)[source]
items()[source]
keys()[source]
name = 'EvePageCache'
pop(key)[source]
values()[source]
class eve_panel.page.PageZero(name=String)[source]

Bases: eve_panel.page.EvePage

Attributes
df
gui

Methods

debug(**kwargs)

Inspect .param.debug method for the full docstring

defaults(**kwargs)

Inspect .param.defaults method for the full docstring

force_new_dynamic_value(**kwargs)

Inspect .param.force_new_dynamic_value method for the full docstring

get_param_values(**kwargs)

Inspect .param.get_param_values method for the full docstring

get_value_generator(**kwargs)

Inspect .param.get_value_generator method for the full docstring

inspect_value(**kwargs)

Inspect .param.inspect_value method for the full docstring

message(**kwargs)

Inspect .param.message method for the full docstring

params(**kwargs)

Inspect .param.params method for the full docstring

print_param_defaults(*args, **kwargs)

Inspect .param.print_param_defaults method for the full docstring

print_param_values(**kwargs)

Inspect .param.print_param_values method for the full docstring

script_repr([imports, prefix])

Deprecated variant of __repr__ designed for generating a runnable script.

set_default(*args, **kwargs)

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn(**kwargs)

Inspect .param.set_dynamic_time_fn method for the full docstring

set_param(**kwargs)

Inspect .param.set_param method for the full docstring

state_pop()

Restore the most recently saved state.

state_push()

Save this instance's state.

verbose(**kwargs)

Inspect .param.verbose method for the full docstring

warning(**kwargs)

Inspect .param.warning method for the full docstring

clone

items

json_view

keys

make_panel

panel

pprint

propagate

pull

push

records

servable

show

table_view

to_dataframe

to_file

to_json

to_records

values

widgets_view

json_view()[source]
name = 'PageZero'
panel()[source]
table_view()[source]
widgets_view()[source]

eve_panel.resource module

class eve_panel.resource.EveResource(**params)[source]

Bases: eve_panel.eve_model.EveModelBase

Interface for an Eve resource. Should be instantiated using an Eve resource definition:

EveResource.from_resource_def(definition, name)

Inheritance:

EveModelBase:

Attributes
df
field_options
gui
is_tabular
metadata

Resource metadata

nitems
page_numbers
paste_bin
plot

Shamelessly copied from the amazing Intake package and modified slightly.

plots
projection
session
sorting_options

Returns valid options for the sorting attribute.

Methods

clear_upload_buffer()

Discards the current upload buffer.

debug(**kwargs)

Inspect .param.debug method for the full docstring

defaults(**kwargs)

Inspect .param.defaults method for the full docstring

filter(**filters)

Filter resource, filters can be any valid mongodb query parameters.

filter_fields(docs)

Filter only fields that are in the resource schema for a list of documents.

find([query, projection, sort, max_results, ...])

Find documents in the remote resource that match a mongodb query.

find_async([query, projection, sort, ...])

Find documents in the remote resource that match a mongodb query.

find_df(**kwargs)

Same as eve_panel.EveResource.find(), only returns a pandas dataframe

find_df_async(**kwargs)

Same as eve_panel.EveResource.find(), only returns a pandas dataframe

find_one([query, projection])

Find the first document that matches the query,

find_one_async([query, projection])

Find the first document that matches the query,

find_page(**kwargs)

Same as eve_panel.EveResource.find(), only returns an EvePage instance

find_page_async(**kwargs)

Same as eve_panel.EveResource.find(), only returns an EvePage instance

flush_buffer([dry])

Attempts to insert docs in current upload buffer.

force_new_dynamic_value(**kwargs)

Inspect .param.force_new_dynamic_value method for the full docstring

from_resource_def(resource_def, resource_name)

Generate a resource interface from a Eve resource definition.

get_param_values(**kwargs)

Inspect .param.get_param_values method for the full docstring

get_value_generator(**kwargs)

Inspect .param.get_value_generator method for the full docstring

insert_documents(docs[, validate, dry])

Insert documents into the database

inspect_value(**kwargs)

Inspect .param.inspect_value method for the full docstring

make_item(**kwargs)

Generate EveItem from key value pairs

message(**kwargs)

Inspect .param.message method for the full docstring

paginate(page_size)

Change how many items will be in each page.

params(**kwargs)

Inspect .param.params method for the full docstring

pprint_schema()

Pretty print the schema in nice yaml format

print_param_defaults(*args, **kwargs)

Inspect .param.print_param_defaults method for the full docstring

print_param_values(**kwargs)

Inspect .param.print_param_values method for the full docstring

project(*fields, **projection)

Project resource (only fetch some of the fields.)

read_clipboard()

Read clipboard into uplaod buffer.

read_file([f, ext])

Read file into the upload buffer.

remove_item(_id)

Remove a single item from the database.

script_repr([imports, prefix])

Deprecated variant of __repr__ designed for generating a runnable script.

set_default(*args, **kwargs)

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn(**kwargs)

Inspect .param.set_dynamic_time_fn method for the full docstring

set_param(**kwargs)

Inspect .param.set_param method for the full docstring

sort(*fields)

Sort data by given fields, fields starting with - will be sorted in descending order.

state_pop()

Restore the most recently saved state.

state_push()

Save this instance's state.

validate_documents(docs[, coerce])

Validates documents against resource schema

verbose(**kwargs)

Inspect .param.verbose method for the full docstring

warning(**kwargs)

Inspect .param.warning method for the full docstring

clear_cache

clone

current_page

current_page_view

decrement_page

download_view

find_one_item

find_one_item_async

get

get_async

get_page

get_page_async

get_page_df

get_page_df_async

get_page_kwargs

get_page_raw

get_page_records

get_page_records_async

gui_progress

increment_page

init_pbar

insert_items

items

keys

make_panel

new_item

next_page

pages

pages_async

pages_raw

panel

post

post_batched

post_with_files

pprint

previous_page

propagate

pull

pull_page

pull_page_async

pull_page_raw

push

push_page

records

reload_page

remove_items

selected_plot_view

servable

show

to_dask

to_dataframe

to_records

upload_errors_view

upload_view

values

clear_cache()[source]
clear_upload_buffer()[source]

Discards the current upload buffer.

clone(**kwargs)[source]
current_page()[source]
current_page_view()[source]
decrement_page()[source]
property df
download_view()[source]
property field_options
fields = []
filter(**filters)[source]

Filter resource, filters can be any valid mongodb query parameters.

Returns

Filtered resource.

Return type

EveResource

filter_fields(docs: Union[Dict, List[Dict]]) List[Dict][source]

Filter only fields that are in the resource schema for a list of documents.

Parameters

docs (Union[dict, list[dict]]) – list of documents or single document.

Returns

list of filtered documents.

Return type

list[dict]

filters = {}
find(query={}, projection={}, sort='', max_results=25, page_number=1, timeout=None)[source]

Find documents in the remote resource that match a mongodb query.

Parameters
  • query (dict, optional) – Mongo query. Defaults to {}.

  • projection (dict, optional) – Mongo projection. Defaults to {}.

  • sort (Union[string, list[tuple]], optional) – Sorting either string as e.g: city,-lastname or list as e.g: [(“city”, 1), (“lastname”, -1)]

  • max_results (int, optional) – Items per page. Defaults to 25.

  • page_number (int, optional) – page to return if query returns more than max_results. Defaults to 1.

Returns

requested page documents that match query

Return type

list

async find_async(query={}, projection={}, sort='', max_results=25, page_number=1, timeout=None)[source]

Find documents in the remote resource that match a mongodb query.

Parameters
  • query (dict, optional) – Mongo query. Defaults to {}.

  • projection (dict, optional) – Mongo projection. Defaults to {}.

  • sort (Union[string, list[tuple]], optional) – Sorting either string as e.g: city,-lastname or list as e.g: [(“city”, 1), (“lastname”, -1)]

  • max_results (int, optional) – Items per page. Defaults to 25.

  • page_number (int, optional) – page to return if query returns more than max_results. Defaults to 1.

Returns

requested page documents that match query

Return type

list

find_df(**kwargs)[source]

Same as eve_panel.EveResource.find(), only returns a pandas dataframe

async find_df_async(**kwargs)[source]

Same as eve_panel.EveResource.find(), only returns a pandas dataframe

find_one(query: dict = {}, projection: dict = {}) dict[source]
Find the first document that matches the query,

optionally project only given fields.

Parameters
  • query (dict, optional) – Mongo qury to perform. Defaults to {}.

  • projection (dict, optional) – Mopngo projection. Defaults to {}.

Returns

If document found, returns it. If not returns None.

Return type

Union[dict, None]

async find_one_async(query: dict = {}, projection: dict = {}) dict[source]
Find the first document that matches the query,

optionally project only given fields.

Parameters
  • query (dict, optional) – Mongo qury to perform. Defaults to {}.

  • projection (dict, optional) – Mopngo projection. Defaults to {}.

Returns

If document found, returns it. If not returns None.

Return type

Union[dict, None]

find_one_item(**kwargs)[source]
async find_one_item_async(**kwargs)[source]
find_page(**kwargs)[source]

Same as eve_panel.EveResource.find(), only returns an EvePage instance

async find_page_async(**kwargs)[source]

Same as eve_panel.EveResource.find(), only returns an EvePage instance

flush_buffer(dry=False)[source]

Attempts to insert docs in current upload buffer.

Parameters

dry (bool, optional) – Only validate docs with actually inserting them to DB. Defaults to False.

Returns

List of succesfully inserted documents.

Return type

list

classmethod from_resource_def(resource_def: dict, resource_name: str, session=None)[source]

Generate a resource interface from a Eve resource definition.

Parameters
  • resource_def (dict) – Eve resource definition

  • resource_name (str) – Name to use for this resource

  • session (EveSession, optional) – session to use. Defaults to None.

Returns

Interface to the remote resource.

Return type

EveResource

get(timeout=None, **params)[source]
async get_async(timeout=None, **params)[source]
get_page(idx, pbar=None)[source]
async get_page_async(idx, pbar=None, timeout=None)[source]
get_page_df(idx, fields=None)[source]
async get_page_df_async(idx, fields=None)[source]
get_page_kwargs(idx)[source]
get_page_raw(idx, pbar=None)[source]
get_page_records(idx)[source]
async get_page_records_async(idx)[source]
property gui
gui_progress()[source]
increment_page()[source]
init_pbar(class_)[source]
insert_documents(docs: Union[List, Tuple, Dict], validate=True, dry=False) Tuple[source]

Insert documents into the database

Parameters
  • docs (list) – Documents to insert.

  • validate (bool, optional) – whether to validate schema of docs locally. Defaults to True.

  • dry (bool, optional) – Enable dry run, will validate but not insert documents into DB. Defaults to False.

Raises

TypeError – raised if docs is not the correct type.

Returns

Successfuly inserted, rejected, rejection reasons.

Return type

tuple[list, list, list]

insert_items(items: Union[eve_panel.item.EveItem, List[eve_panel.item.EveItem]])[source]
property is_tabular
items()[source]
items_per_page = 100
keys()[source]
make_item(**kwargs)[source]

Generate EveItem from key value pairs

Returns

EveItem instance that enforces schema of current resource.

Return type

EveItem

make_panel(show_client=True, tabs_location='above')[source]
property metadata: dict

Resource metadata

Returns

Resource metadata

Return type

dict

name = 'EveResource'
new_item(data={})[source]
next_page()[source]
property nitems
page_number = 0
property page_numbers
pages(start=1, end=None, asynchronous=True, executor=None, pbar=None)[source]
async pages_async(start=1, end=None, pbar=<class 'tqdm.std.tqdm'>)[source]
pages_raw(start=1, end=None, asynchronous=True, executor=None, pbar=None)[source]
paginate(page_size: int)[source]

Change how many items will be in each page.

Parameters

page_size (int) – number of items per page

Returns

Paginated EveResource

Return type

EveResource

property paste_bin
property plot

Shamelessly copied from the amazing Intake package and modified slightly. Returns a hvPlot object to provide a high-level plotting API. Will use Dask if available, reading parralelism is set by page size and then data is repartitioned by number of cpus available. small collections are pre-read and converted to regular pandas dataframe. To display in a notebook, be sure to run panel_eve.output_notebook() first.

property plots
post(docs, raise_status=True)[source]
post_batched(docs)[source]
post_with_files(docs)[source]
pprint_schema()[source]

Pretty print the schema in nice yaml format

previous_page()[source]
project(*fields, **projection)[source]

Project resource (only fetch some of the fields.)

Raises

ValueError – raised if passed inconsistent projections.

Returns

Projected resource.

Return type

EveResource

property projection
pull(start=1, end=None)[source]
pull_page(idx=0, cache_result=True, timeout=None)[source]
async pull_page_async(idx=0, cache_result=True, timeout=None)[source]
pull_page_raw(idx=1, cache_result=True, timeout=None)[source]
push(idxs=None)[source]
push_page(idx)[source]
read_clipboard()[source]

Read clipboard into uplaod buffer.

read_file(f: Optional[Union[BinaryIO, str]] = None, ext: str = 'csv')[source]

Read file into the upload buffer.

Parameters
  • f (File, optional) – file like object. Defaults to None.

  • ext (str, optional) – file extension. Defaults to “csv”.

Returns

documents read

Return type

list

records()[source]
reload_page(page_number=None)[source]
remove_item(_id: str) bool[source]

Remove a single item from the database.

Parameters

_id (str) – _id field of the item to be removed.

Returns

Whether item was removed succesfully.

Return type

bool

remove_items(*ids)[source]
schema = {}
selected_plot_view()[source]
session = None
sort(*fields)[source]

Sort data by given fields, fields starting with - will be sorted in descending order.

sorting = []
property sorting_options: list

Returns valid options for the sorting attribute.

Returns

list of fields

Return type

list

to_dask(pages=None, persist=False, progress=True)[source]
to_dataframe(start=1, end=None, asynchronous=True, executor=None, pbar=None)[source]
to_records(start=1, end=None, asynchronous=True, executor=None, pbar=None)[source]
upload_errors = []
upload_errors_view()[source]
upload_view()[source]
validate_documents(docs: List[Dict], coerce=True) Tuple[source]

Validates documents against resource schema

Parameters

docs (list[dict]) – list of documents to insert

Returns

tuple of documents lists: (valid, rejected, errors)

Return type

tuple[list,list,list]

values()[source]
eve_panel.resource.not_empty(v)[source]

eve_panel.settings module

class eve_panel.settings.Config(name=String)[source]

Bases: param.parameterized.Parameterized

Attributes
GUI_MAX_HEIGHT
GUI_MAX_WIDTH

Methods

debug(**kwargs)

Inspect .param.debug method for the full docstring

defaults(**kwargs)

Inspect .param.defaults method for the full docstring

force_new_dynamic_value(**kwargs)

Inspect .param.force_new_dynamic_value method for the full docstring

get_param_values(**kwargs)

Inspect .param.get_param_values method for the full docstring

get_value_generator(**kwargs)

Inspect .param.get_value_generator method for the full docstring

inspect_value(**kwargs)

Inspect .param.inspect_value method for the full docstring

message(**kwargs)

Inspect .param.message method for the full docstring

params(**kwargs)

Inspect .param.params method for the full docstring

print_param_defaults(*args, **kwargs)

Inspect .param.print_param_defaults method for the full docstring

print_param_values(**kwargs)

Inspect .param.print_param_values method for the full docstring

script_repr([imports, prefix])

Deprecated variant of __repr__ designed for generating a runnable script.

set_default(*args, **kwargs)

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn(**kwargs)

Inspect .param.set_dynamic_time_fn method for the full docstring

set_param(**kwargs)

Inspect .param.set_param method for the full docstring

state_pop()

Restore the most recently saved state.

state_push()

Save this instance's state.

verbose(**kwargs)

Inspect .param.verbose method for the full docstring

warning(**kwargs)

Inspect .param.warning method for the full docstring

pprint

DEBUG = False
DEFAULT_AUDIENCE = ''
DEFAULT_CLIENT_ID = 'eve-panel'
DEFAULT_TIMEOUT = 20
DEFAULT_VIEW_FORMAT = 'Table'
GUI_HEIGHT = 400
GUI_MAX_HEIGHT = None
GUI_MAX_WIDTH = None
GUI_WIDTH = 1000
IGNORE_ERRORS = False
MAX_LOG_SIZE = 20
MAX_MESSAGES = 3
META_FIELDS = ['_version', '_latest_version', '_etag', '_created']
OAUTH_CERT_PATH = '/.well-know/certs'
OAUTH_CODE_PATH = '/device/code'
OAUTH_DOMAIN = 'http://localhost/oauth'
OAUTH_TOKEN_PATH = '/token'
SHOW_INDICATOR = True
SIZING_MODE = 'stretch_width'
WIDGET_VIEW_ITEMS = 8
name = 'Config'
class eve_panel.settings.ConfigParameter(klass, env_prefix='', **kwargs)[source]

Bases: param.parameterized.Parameter

An attribute descriptor for declaring parameters.

Parameters are a special kind of class attribute. Setting a Parameterized class attribute to be a Parameter instance causes that attribute of the class (and the class’s instances) to be treated as a Parameter. This allows special behavior, including dynamically generated parameter values, documentation strings, constant and read-only parameters, and type or range checking at assignment time.

For example, suppose someone wants to define two new kinds of objects Foo and Bar, such that Bar has a parameter delta, Foo is a subclass of Bar, and Foo has parameters alpha, sigma, and gamma (and delta inherited from Bar). She would begin her class definitions with something like this:

class Bar(Parameterized):
    delta = Parameter(default=0.6, doc='The difference between steps.')
    ...
class Foo(Bar):
    alpha = Parameter(default=0.1, doc='The starting value.')
    sigma = Parameter(default=0.5, doc='The standard deviation.',
                    constant=True)
    gamma = Parameter(default=1.0, doc='The ending value.')
    ...

Class Foo would then have four parameters, with delta defaulting to 0.6.

Parameters have several advantages over plain attributes:

  1. Parameters can be set automatically when an instance is constructed: The default constructor for Foo (and Bar) will accept arbitrary keyword arguments, each of which can be used to specify the value of a Parameter of Foo (or any of Foo’s superclasses). E.g., if a script does this:

    myfoo = Foo(alpha=0.5)
    

    myfoo.alpha will return 0.5, without the Foo constructor needing special code to set alpha.

    If Foo implements its own constructor, keyword arguments will still be accepted if the constructor accepts a dictionary of keyword arguments (as in def __init__(self,**params):), and then each class calls its superclass (as in super(Foo,self).__init__(**params)) so that the Parameterized constructor will process the keywords.

  2. A Parameterized class need specify only the attributes of a Parameter whose values differ from those declared in superclasses; the other values will be inherited. E.g. if Foo declares:

    delta = Parameter(default=0.2)
    

    the default value of 0.2 will override the 0.6 inherited from Bar, but the doc will be inherited from Bar.

  3. The Parameter descriptor class can be subclassed to provide more complex behavior, allowing special types of parameters that, for example, require their values to be numbers in certain ranges, generate their values dynamically from a random distribution, or read their values from a file or other external source.

  4. The attributes associated with Parameters provide enough information for automatically generating property sheets in graphical user interfaces, allowing Parameterized instances to be edited by users.

Note that Parameters can only be used when set as class attributes of Parameterized classes. Parameters used as standalone objects, or as class attributes of non-Parameterized classes, will not have the behavior described here.

Attributes
allow_None
constant
default
doc
env_prefix
instantiate
klass
label
name
owner
per_instance
pickle_default_value
precedence
readonly
watchers

Methods

deserialize(value)

Given a serializable Python value, return a value that the parameter can be set to

serialize(value)

Given the parameter value, return a Python value suitable for serialization

schema

env_prefix
klass

eve_panel.types module

class eve_panel.types.CoerceClassSelector(class_, default=None, instantiate=True, is_instance=True, **params)[source]

Bases: param.ClassSelector

Parameter allowing selection of either a subclass or an instance of a given set of classes. By default, requires an instance, but if is_instance=False, accepts a class instead. Both class and instance values respect the instantiate slot, though it matters only for is_instance=True.

Attributes
allow_None
class_
constant
default
doc
instantiate
is_instance
label
name
owner
per_instance
pickle_default_value
precedence
readonly
watchers

Methods

deserialize(value)

Given a serializable Python value, return a value that the parameter can be set to

get_range()

Return the possible types for this parameter's value.

serialize(value)

Given the parameter value, return a Python value suitable for serialization

schema

eve_panel.types.base64_to_binary(x)[source]
eve_panel.types.bytes_param(**kwargs)[source]
eve_panel.types.objectid_param(**kwargs)[source]
eve_panel.types.set_param(**kwargs)[source]
eve_panel.types.to_binary(x)[source]

eve_panel.utils module

class eve_panel.utils.NumpyJSONENncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]

Bases: json.encoder.JSONEncoder

Methods

default(obj)

Implement this method in a subclass such that it returns a serializable object for o, or calls the base implementation (to raise a TypeError).

encode(o)

Return a JSON string representation of a Python data structure.

iterencode(o[, _one_shot])

Encode the given object and yield each string representation as available.

default(obj)[source]

Implement this method in a subclass such that it returns a serializable object for o, or calls the base implementation (to raise a TypeError).

For example, to support arbitrary iterators, you could implement default like this:

def default(self, o):
    try:
        iterable = iter(o)
    except TypeError:
        pass
    else:
        return list(iterable)
    # Let the base class default method raise the TypeError
    return JSONEncoder.default(self, o)
eve_panel.utils.is_valid_url(url)[source]
eve_panel.utils.requires_login(method)[source]
eve_panel.utils.to_data_dict(doc)[source]
eve_panel.utils.to_json_compliant(obj)[source]

eve_panel.widgets module

class eve_panel.widgets.FileInputPreview(**params)[source]

Bases: panel.widgets.input.FileInput

Attributes
accept
aspect_ratio
background
css_classes
filename
height
max_height
max_width
mime_type
min_height
min_width
sizing_mode
value
width

Methods

app([notebook_url, port])

Displays a bokeh server app inline in the notebook.

clone(**params)

Makes a copy of the object sharing the same parameters.

controls([parameters, jslink])

Creates a set of widgets which allow manipulating the parameters on this instance.

debug(**kwargs)

Inspect .param.debug method for the full docstring

defaults(**kwargs)

Inspect .param.defaults method for the full docstring

embed([max_states, max_opts, json, ...])

Renders a static version of a panel in a notebook by evaluating the set of states defined by the widgets in the model.

force_new_dynamic_value(**kwargs)

Inspect .param.force_new_dynamic_value method for the full docstring

from_param(parameter, **params)

Construct a widget from a Parameter and link the two bi-directionally.

get_param_values(**kwargs)

Inspect .param.get_param_values method for the full docstring

get_root([doc, comm, preprocess])

Returns the root model and applies pre-processing hooks

get_value_generator(**kwargs)

Inspect .param.get_value_generator method for the full docstring

inspect_value(**kwargs)

Inspect .param.inspect_value method for the full docstring

jscallback([args])

Allows defining a JS callback to be triggered when a property changes on the source object.

jslink(target[, code, args, bidirectional])

Links properties on the source object to those on the target object in JS code.

link(target[, callbacks, bidirectional])

Links the parameters on this object to attributes on another object in Python.

message(**kwargs)

Inspect .param.message method for the full docstring

params(**kwargs)

Inspect .param.params method for the full docstring

pprint()

Prints a compositional repr of the class.

print_param_defaults(*args, **kwargs)

Inspect .param.print_param_defaults method for the full docstring

print_param_values(**kwargs)

Inspect .param.print_param_values method for the full docstring

save(filename)

Saves the uploaded FileInput data to a file or BytesIO object.

script_repr([imports, prefix])

Deprecated variant of __repr__ designed for generating a runnable script.

select([selector])

Iterates over the Viewable and any potential children in the applying the Selector.

servable([title, location, area])

Serves the object if in a panel serve context and returns the Panel object to allow it to display itself in a notebook context. :param title: A string title to give the Document (if served as an app) :type title: str :param location: Whether to create a Location component to observe and set the URL location. :type location: boolean or panel.io.location.Location :param area: The area of a template to add the component too. Only has an effect if pn.config.template has been set. :type area: str.

server_doc([doc, title, location])

Returns a serveable bokeh Document with the panel attached

set_default(*args, **kwargs)

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn(**kwargs)

Inspect .param.set_dynamic_time_fn method for the full docstring

set_param(**kwargs)

Inspect .param.set_param method for the full docstring

show([title, port, address, ...])

Starts a Bokeh server and displays the Viewable in a new tab.

state_pop()

Restore the most recently saved state.

state_push()

Save this instance's state.

verbose(**kwargs)

Inspect .param.verbose method for the full docstring

warning(**kwargs)

Inspect .param.warning method for the full docstring

preview

name = 'FileInputPreview'
preview()[source]
eve_panel.widgets.LiteralSchemaInput(name, schema, type_=None)[source]
class eve_panel.widgets.LiteralSchemaInputBase(**params)[source]

Bases: panel.widgets.input.LiteralInput

[summary]

Parameters

LiteralInput ([type]) – [description]

Attributes
aspect_ratio
background
css_classes
height
max_height
max_width
min_height
min_width
sizing_mode
type
value
width

Methods

app([notebook_url, port])

Displays a bokeh server app inline in the notebook.

clone(**params)

Makes a copy of the object sharing the same parameters.

controls([parameters, jslink])

Creates a set of widgets which allow manipulating the parameters on this instance.

debug(**kwargs)

Inspect .param.debug method for the full docstring

defaults(**kwargs)

Inspect .param.defaults method for the full docstring

embed([max_states, max_opts, json, ...])

Renders a static version of a panel in a notebook by evaluating the set of states defined by the widgets in the model.

force_new_dynamic_value(**kwargs)

Inspect .param.force_new_dynamic_value method for the full docstring

from_param(parameter, **params)

Construct a widget from a Parameter and link the two bi-directionally.

get_param_values(**kwargs)

Inspect .param.get_param_values method for the full docstring

get_root([doc, comm, preprocess])

Returns the root model and applies pre-processing hooks

get_value_generator(**kwargs)

Inspect .param.get_value_generator method for the full docstring

inspect_value(**kwargs)

Inspect .param.inspect_value method for the full docstring

jscallback([args])

Allows defining a JS callback to be triggered when a property changes on the source object.

jslink(target[, code, args, bidirectional])

Links properties on the source object to those on the target object in JS code.

link(target[, callbacks, bidirectional])

Links the parameters on this object to attributes on another object in Python.

message(**kwargs)

Inspect .param.message method for the full docstring

params(**kwargs)

Inspect .param.params method for the full docstring

pprint()

Prints a compositional repr of the class.

print_param_defaults(*args, **kwargs)

Inspect .param.print_param_defaults method for the full docstring

print_param_values(**kwargs)

Inspect .param.print_param_values method for the full docstring

save(filename[, title, resources, template, ...])

Saves Panel objects to file.

script_repr([imports, prefix])

Deprecated variant of __repr__ designed for generating a runnable script.

select([selector])

Iterates over the Viewable and any potential children in the applying the Selector.

servable([title, location, area])

Serves the object if in a panel serve context and returns the Panel object to allow it to display itself in a notebook context. :param title: A string title to give the Document (if served as an app) :type title: str :param location: Whether to create a Location component to observe and set the URL location. :type location: boolean or panel.io.location.Location :param area: The area of a template to add the component too. Only has an effect if pn.config.template has been set. :type area: str.

server_doc([doc, title, location])

Returns a serveable bokeh Document with the panel attached

set_default(*args, **kwargs)

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn(**kwargs)

Inspect .param.set_dynamic_time_fn method for the full docstring

set_param(**kwargs)

Inspect .param.set_param method for the full docstring

show([title, port, address, ...])

Starts a Bokeh server and displays the Viewable in a new tab.

state_pop()

Restore the most recently saved state.

state_push()

Save this instance's state.

verbose(**kwargs)

Inspect .param.verbose method for the full docstring

warning(**kwargs)

Inspect .param.warning method for the full docstring

validate_schema

name = 'LiteralSchemaInputBase'
validate_schema(value)[source]
eve_panel.widgets.PDFViewer(pdf, width=800, height=500)[source]
eve_panel.widgets.PNGViewer(png, width=800, height=500)[source]
class eve_panel.widgets.Progress(name=String)[source]

Bases: param.parameterized.Parameterized

Methods

__call__(**params)

Call self as a function.

debug(**kwargs)

Inspect .param.debug method for the full docstring

defaults(**kwargs)

Inspect .param.defaults method for the full docstring

force_new_dynamic_value(**kwargs)

Inspect .param.force_new_dynamic_value method for the full docstring

get_param_values(**kwargs)

Inspect .param.get_param_values method for the full docstring

get_value_generator(**kwargs)

Inspect .param.get_value_generator method for the full docstring

inspect_value(**kwargs)

Inspect .param.inspect_value method for the full docstring

message(**kwargs)

Inspect .param.message method for the full docstring

params(**kwargs)

Inspect .param.params method for the full docstring

print_param_defaults(*args, **kwargs)

Inspect .param.print_param_defaults method for the full docstring

print_param_values(**kwargs)

Inspect .param.print_param_values method for the full docstring

script_repr([imports, prefix])

Deprecated variant of __repr__ designed for generating a runnable script.

set_default(*args, **kwargs)

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn(**kwargs)

Inspect .param.set_dynamic_time_fn method for the full docstring

set_param(**kwargs)

Inspect .param.set_param method for the full docstring

state_pop()

Restore the most recently saved state.

state_push()

Save this instance's state.

verbose(**kwargs)

Inspect .param.verbose method for the full docstring

warning(**kwargs)

Inspect .param.warning method for the full docstring

pprint

reset

update

view

active = False
desc = 'Loading'
name = 'Progress'
reset()[source]
total = 100
unit = 'iterations'
update(inc=1)[source]
value = 0
view()[source]
eve_panel.widgets.get_widget(name, schema)[source]

Module contents

Eve-panel.

A marriage between Eve and Panel.

Example:

Todo:

eve_panel.extension()[source]
eve_panel.notebook()
eve_panel.output_notebook()