volttron.utils package¶
-
class
volttron.utils.
FileReloader
(filetowatch, callback)[source]¶ Bases:
watchdog.events.PatternMatchingEventHandler
-
on_any_event
(event)[source]¶ Catch-all event handler.
Parameters: event ( FileSystemEvent
) – The event object representing the file system event.
-
watchfile
¶
-
-
volttron.utils.
is_ip_private
(vip_address)[source]¶ Determines if the passed vip_address is a private ip address or not.
Parameters: vip_address – A valid ip address. Returns: True if an internal ip address.
Submodules¶
volttron.utils.docs module¶
doc_inherit decorator
Usage:
- class Foo(object):
- def foo(self):
- “Frobber” pass
- class Bar(Foo):
@doc_inherit def foo(self):
pass
Now, Bar.foo.__doc__ == Bar().foo.__doc__ == Foo.foo.__doc__ == “Frobber”
-
class
volttron.utils.docs.
DocInherit
(mthd)[source]¶ Bases:
object
Docstring inheriting method descriptor
The class itself is also used as a decorator
-
volttron.utils.docs.
doc_inherit
¶ alias of
volttron.utils.docs.DocInherit
volttron.utils.persistance module¶
-
class
volttron.utils.persistance.
PersistentDict
(filename, flag='c', mode=None, format='pickle', *args, **kwds)[source]¶ Bases:
dict
Persistent dictionary with an API compatible with shelve and anydbm.
The dict is kept in memory, so the dictionary operations run as fast as a regular dictionary.
Write to disk is delayed until close or sync (similar to gdbm’s fast mode).
Input file format is automatically discovered. Output file format is selectable between pickle, json, and csv. All three serialization formats are backed by fast C implementations.
volttron.utils.prompt module¶
volttron.utils.rmq_config_params module¶
volttron.utils.rmq_mgmt module¶
volttron.utils.rmq_setup module¶
volttron.utils.valid_uuid module¶
-
volttron.utils.valid_uuid.
validate_uuid4
(uuid_string)[source]¶ Validate that a UUID string is in fact a valid uuid4. Happily, the uuid module does the actual checking for us. It is vital that the ‘version’ kwarg be passed to the UUID() call, otherwise any 32-character hex string is considered valid.