__version__ = "3.7.0"
__all__ = [
"_jupyter_labextension_paths",
"Server",
"Client",
"PerspectiveError",
"ProxySession",
"AsyncClient",
"AsyncServer",
"num_cpus",
"set_num_cpus",
]
import functools
from .perspective import (
Client,
PerspectiveError,
ProxySession,
PyServer as Server,
PyAsyncServer as AsyncServer,
AsyncClient,
Table, View, num_cpus,
set_num_cpus,
)
GLOBAL_SERVER = Server()
GLOBAL_CLIENT = GLOBAL_SERVER.new_local_client()
@functools.wraps(Client.table)
def table(*args, **kwargs):
return GLOBAL_CLIENT.table(*args, **kwargs)
@functools.wraps(Client.open_table)
def open_table(*args, **kwargs):
return GLOBAL_CLIENT.table(*args, **kwargs)
@functools.wraps(Client.get_hosted_table_names)
def get_hosted_table_names(*args, **kwargs):
return GLOBAL_CLIENT.get_hosted_table_names(*args, **kwargs)
def _jupyter_labextension_paths():
return [{"src": "labextension", "dest": "@finos/perspective-jupyterlab"}]