diff options
Diffstat (limited to 'bsie/utils')
-rw-r--r-- | bsie/utils/__init__.py | 20 | ||||
-rw-r--r-- | bsie/utils/bsfs.py | 20 | ||||
-rw-r--r-- | bsie/utils/node.py | 39 |
3 files changed, 79 insertions, 0 deletions
diff --git a/bsie/utils/__init__.py b/bsie/utils/__init__.py new file mode 100644 index 0000000..1137187 --- /dev/null +++ b/bsie/utils/__init__.py @@ -0,0 +1,20 @@ +"""Common tools and definitions. + +Part of the bsie module. +A copy of the license is provided with the project. +Author: Matthias Baumgartner, 2022 +""" +# imports +import typing + +# inner-module imports +from . import bsfs +from . import node + +# exports +__all__: typing.Sequence[str] = ( + 'bsfs', + 'node', + ) + +## EOF ## diff --git a/bsie/utils/bsfs.py b/bsie/utils/bsfs.py new file mode 100644 index 0000000..33eb178 --- /dev/null +++ b/bsie/utils/bsfs.py @@ -0,0 +1,20 @@ +"""BSFS bridge, provides BSFS bindings for BSIE. + +Part of the bsie module. +A copy of the license is provided with the project. +Author: Matthias Baumgartner, 2022 +""" +# imports +import typing + +# bsfs imports +from bsfs.utils import URI +from bsfs.utils import typename + +# exports +__all__: typing.Sequence[str] = ( + 'URI', + 'typename', + ) + +## EOF ## diff --git a/bsie/utils/node.py b/bsie/utils/node.py new file mode 100644 index 0000000..60863a4 --- /dev/null +++ b/bsie/utils/node.py @@ -0,0 +1,39 @@ +"""Lighweight Node to bridge to BSFS. + +Part of the bsie module. +A copy of the license is provided with the project. +Author: Matthias Baumgartner, 2022 +""" +# imports +import typing + +# inner-module imports +from bsie.utils.bsfs import URI + +# exports +__all__: typing.Sequence[str] = ( + 'Node' + ) + + +## code ## + +class Node(): + """Lightweight Node, disconnected from any bsfs structures.""" + + # node type. + node_type: URI + + # node URI. + uri: URI + + def __init__( + self, + node_type: URI, + uri: URI, + ): + # assign members + self.node_type = URI(node_type) + self.uri = URI(uri) + +## EOF ## |