scriptor

Submodules

Package Contents

Classes

Request

viur

MemoryCsvWriter

Writer for CSV exports

FileSystemCsvWriter

Writer for CSV exports

logging

ListModule

SingletonModule

TreeModule

MemoryWriter

FilePickerReader

prototypes

Functions

get_json_object(text)

is_pyodide_context()

print(*args, **kwargs)

sleep(ms)

params()

init()

Attributes

old_print

scriptor.get_json_object(text: str)
scriptor.is_pyodide_context()
class scriptor.Request(method: str, url: str, credentials: bool = False, headers: dict = None, data: dict = None)
COOKIES
async perform()
async json()
async text()
async blob()
async static get(*args, **kwargs)
async static post(*args, **kwargs)
async static put(*args, **kwargs)
async static delete(*args, **kwargs)
async static patch(*args, **kwargs)
class scriptor.viur
class request(method: str, url: str, params=None, renderer: str = None)

Bases: scriptor.network.Request

static build_url(url)
async static get(*args, **kwargs)
async static post(*args, **kwargs)
async static secure_post(url, params=None, renderer: str = None)
class list(*, url: str = '', module: str = '', params: dict = None, group: str = '', renderer: str = '')

Fetches a list from a VIUR module

__aiter__()
async __anext__()
static build_url(action: str, url: str, module: str, group: str = '', key: str = '')
async static view(*, url: str = '', module: str = '', key: str = '', params: dict = None, group: str = '', **kwargs)
async static edit(*, url: str = '', module: str = '', key: str = '', params: dict = None, group: str = '', **kwargs)
async static structure(*, url: str = '', module: str = '', group: str = '', **kwargs)
async static preview(*, url: str = '', module: str = '', group: str = '', params: dict = None, **kwargs)
async static add(*, url: str = '', module: str = '', params: dict = None, group: str = '', **kwargs)
async static delete(*, url: str = '', module: str = '', key: str = '', params: dict = None, group: str = '', **kwargs)
async static list_root_nodes(*, url: str = '', module: str = '', params: dict = None, group: str = '', **kwargs)
class scriptor.MemoryCsvWriter(*args, delimiter=';', formatter: callable = None)

Bases: scriptor.writer.MemoryWriter

Writer for CSV exports

property writer
DEFAULT_FILE_NAME = 'export.csv'
fmt(value)
async write(values: object)
__str__()

Return str(self).

class scriptor.FileSystemCsvWriter(*args, **kwargs)

Bases: scriptor.writer.FilePickerWriter

Writer for CSV exports

DEFAULT_FILE_NAME = 'export.csv'
set_formatter(formatter: callable)
set_columns(columns: list[str])
set_delimiter(delimiter: str)
async flush()
async __aenter__()
async __aexit__(*args)
async write(values: object, should_flush: bool = False)
class scriptor.logging
CRITICAL = 50
FATAL
ERROR = 40
WARNING = 30
WARN
INFO = 20
DEBUG = 10
NOTSET = 0
static format_text(*args, **kwargs)
static set_level(level: int)
static debug(*args, **kwargs)
static info(*args, **kwargs)
static warning(*args, **kwargs)
static error(*args, **kwargs)
class scriptor.ListModule(name: str)

Bases: ExtendedModule

async for_each(callback: callable, params: dict = None, **kwargs)
class scriptor.SingletonModule(name: str)

Bases: BaseModule

async edit(params: dict = None, group: str = '', **kwargs)
class scriptor.TreeModule(name: str)

Bases: ExtendedModule

async edit(group: str, key: str, params: dict = None, **kwargs)
list(group: str, params: dict = None, **kwargs) scriptor.viur.viur.list
async add(group: str, params: dict = None, **kwargs)
async view(group: str, key: str, **kwargs) dict
async preview(group: str, params: dict = None, **kwargs)
async list_root_nodes(**kwargs)
async delete(group: str, key: str, params: dict = None, **kwargs)
async move(key: str, parentNode: str, **kwargs)
async for_each(callback: callable, root_node_key: str = None, params: dict = None, **kwargs)
class scriptor.MemoryWriter(content: str = '')

Bases: WriterBase

DEFAULT_FILE_NAME = 'export.txt'
write(content: str)
write_line(content: str)
__str__() str

Return str(self).

clear()
download(name: str = '')
class scriptor.FilePickerReader(file_object: object)

Bases: scriptor.writer.Picker

property content: str
TYPE_NAME = 'showOpenFilePicker'
async on_startup()
async close()
readlines()
read()
__str__() str

Return str(self).

scriptor.old_print
scriptor.print(*args, **kwargs)
async scriptor.sleep(ms: int)
class scriptor.prototypes
list
singleton
tree
scriptor.params()
async scriptor.init()