core package

Module contents

basic package for the program.

class Object[source]

Bases: builtins.dict

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

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

announce to all the running cores.

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.

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

set a attribute on this object.

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

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

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

get the arguments of the txt attribute.

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

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

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

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

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

timestamp of related filename.

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

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

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

cloned object, with only the proper keys used.

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

parse the txt attribute.

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

timestamp of related filename.

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

get the rest of the txt attribute.

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

root directory of the program.

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

take a slice of the Object.

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.

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_path(zelf, *args, **kwargs)[source]

create workdir if necessary.

make_signature(zelf, sig=None)[source]

signature of the data contained in this object.

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

list of all object’s.

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

signal ok.

pretty(zelf)[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]

register a value in a list on this object.

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

send reply to origin.

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

save JSON to disk.

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

output text through the _target attribute.

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

list of desired objects.

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

see if this objects has the desired attributes.

show(zelf)[source]

list of key,value pairs.

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

sync JSON to disk.

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

create JSON ready to be saved to disk.

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

full JSON dump of this object.

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

JSON string representation of this object.

wait(zelf, sec=180.0)[source]

wait for ready state.

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

actual write to disk.

boot(*args, **kwargs)[source]

get the program properly initialized.

shutdown()[source]

close the program in a appropiate manner.

Table Of Contents