aboutsummaryrefslogtreecommitdiffstats
path: root/bsfs/front/bsfs.py
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2022-12-18 14:17:44 +0100
committerMatthias Baumgartner <dev@igsor.net>2022-12-18 14:17:44 +0100
commit12d95ed8bda18f2ef9d36190919cb838bfb5efcf (patch)
tree84202e614a9f477e9bff3a4f20456ebc8c000321 /bsfs/front/bsfs.py
parent8ed8dbb4010a9a75cf6e61d185327825fe783776 (diff)
downloadbsfs-12d95ed8bda18f2ef9d36190919cb838bfb5efcf.tar.gz
bsfs-12d95ed8bda18f2ef9d36190919cb838bfb5efcf.tar.bz2
bsfs-12d95ed8bda18f2ef9d36190919cb838bfb5efcf.zip
bsfs lib and builders
Diffstat (limited to 'bsfs/front/bsfs.py')
-rw-r--r--bsfs/front/bsfs.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/bsfs/front/bsfs.py b/bsfs/front/bsfs.py
new file mode 100644
index 0000000..968b3f5
--- /dev/null
+++ b/bsfs/front/bsfs.py
@@ -0,0 +1,29 @@
+"""
+
+Part of the BlackStar filesystem (bsfs) module.
+A copy of the license is provided with the project.
+Author: Matthias Baumgartner, 2022
+"""
+# imports
+import typing
+
+# bsfs imports
+from bsfs.graph import Graph
+
+# inner-module imports
+from . import builder
+
+# exports
+__all__: typing.Sequence[str] = (
+ 'Open',
+ )
+
+
+## code ##
+
+# NOTE: Capitalized to mark entry point and to separate from builtin open.
+def Open(cfg: typing.Any) -> Graph: # pylint: disable=invalid-name
+ """Open a BSFS storage and return a `bsfs.graph.Graph` instance."""
+ return builder.build_graph(cfg)
+
+## EOF ##