pupy.savings_n_loads

Module Contents

timestamp()

Time stamp string w/ format yyyy-mm-ddTHH-MM-SS

Returns:timestamp string
safe_path(filepath)
Parameters:filepath
ensure_save(filepath, n=0)
savings(filepath, string, clobber=True)

Save s(tring) to filepath as txt file

Parameters:
  • filepath – Filepath save location
  • string – File as a string to be saved
  • clobber – Save over a file if the filepath exists
Returns:

None? what do you want? confirmation?

loads(filepath)

Load a (txt) file as a string

Parameters:filepath – return:
sjson(filepath, data, min=False)

Save json-serial-ize-able data to a specific filepath.

Parameters:
  • filepath – save filepath
  • data – json ready data
  • min – minified format flag
Returns:

None

save_jasm(filepath, data, min=False)

Alias for sjson (which stands for ‘save-json’)

sjasm(filepath, data, min=False)

Alias for sjson (which stands for ‘save-json’)

spak(filepath, data, min=False)

Alias for sjson (which stands for ‘save-json’)

ljson(filepath)

Load a json file given a filepath and return the file-data

Parameters:filepath – path to the jasm file you want to load
Returns:Loaded file contents
load_jasm(filepath)

Alias for ljson (which stands for ‘load-json’)

ljasm(filepath)

Alias for ljson (which stands for ‘load-json’)

lpak(filepath)

Alias for ljson (which stands for ‘load-json’)

touch(filepath)

Touches a file just like touch on the command line

class Jasm(path)

Bases:object

Jasm the Grundle Bug

__call__(self, funk)

Json saving and loading