bard.object module

basic package for the program.

class Object[source]

Bases: builtins.dict

basic Object on which the rest of the program is based.

all(zelf, *args, **kwargs)[source]
announce(zelf, *args, **kwargs)[source]
by_key(zelf, *args, **kwargs)[source]
check(zelf, *args, **kwargs)[source]

determine the command in the zelf.txt attribute, if present.

check_notwanted(zelf, *args, **kwargs)[source]

whether an object is not desired.

check_wanted(zelf, *args, **kwargs)[source]

whether an object is desired.

clear(zelf)[source]

clear the ready state.

dated(zelf, *args, **kwargs)[source]

retrieve the creation time of an object.

days(zelf, *args, **kwargs)[source]

get the number of days relative to the object’s creation time.

define(zelf, *args, **kwargs)[source]

set a attribute on this object.

display(zelf, *args, **kwargs)[source]
display_list(zelf, *args, **kwargs)[source]
filedate(zelf, *args, **kwargs)[source]

timestamp of related filename.

filetime(zelf, *args, **kwargs)[source]

timestamp of related filename.

find(zelf, *args, **kwargs)[source]
first(zelf, *args, **kwargs)[source]

return the first object where the key and/or value matches.

format(zelf, *args, **kwargs)[source]
full(zelf, *args, **kwargs)[source]
get_parsed(zelf, *args, **kwargs)[source]

parse the txt attribute.

get_path(zelf, *args, **kwargs)[source]
get_root(zelf, *args, **kwargs)[source]
get_timed(zelf, *args, **kwargs)[source]

retrieve the creation time of an object.

get_url(zelf, *args, **kwargs)[source]

url of the object’s file so that it can be retrieved when API server is running.

json(zelf, *args, **kwargs)[source]

JSON string representation of this object.

last(zelf, *args, **kwargs)[source]

return the last object where the key and/or value matches.

load(zelf, *args, **kwargs)[source]

load a JSON file into this object.

make_signature(zelf, sig=None)[source]

signature of the data contained in this object.

names(zelf, *args, **kwargs)[source]

skip the unwanted keys e.g those that start with a “_”.

obj(zelf, *args, **kwargs)[source]

cloned object, with only the proper keys used.

objects(zelf, *args, **kwargs)[source]

list of all object’s.

ok(zelf, *args, **kwargs)[source]

signal ok.

prepare(zelf, *args, **kwargs)[source]

create JSON ready to be saved to disk.

pretty(zelf, *args, **kwargs)[source]

nice formatted JSON string of this object.

read(zelf, *args, **kwargs)[source]

read the JSON file from disk.

ready(zelf)[source]

signal to ready state.

register(zelf, *args, **kwargs)[source]

callback type with corresponding callback function.

remove(zelf, *args, **kwargs)[source]
reply(zelf, *args, **kwargs)[source]

send reply to origin.

reply_list(zelf, *args, **kwargs)[source]
represent(zelf, *args, **kwargs)[source]
rest(zelf, *args, **kwargs)[source]

get the rest of the txt attribute.

save(zelf, *args, **kwargs)[source]

save JSON to disk.

search(zelf, *args, **kwargs)[source]
selected(zelf, *args, **kwargs)[source]

list of desired objects.

selector(zelf, *args, **kwargs)[source]

see if this objects has the desired attributes.

show(zelf, *args, **kwargs)[source]

list of key,value pairs.

slice(zelf, *args, **kwargs)[source]

take a slice of the Object.

sync(zelf, *args, **kwargs)[source]

sync JSON to disk.

to_full(zelf, *args, **kwargs)[source]

full JSON dump of this object.

wait(zelf, sec=180.0)[source]

wait for ready state.

words(zelf, *args, **kwargs)[source]

get the arguments of the txt attribute.