Overview
bisos.fileObj is an umbrella package for filesystem-directory-backed data structures in BISOS. Each module inside is a self-contained abstraction whose identity and state live in a filesystem directory, not in a database or in memory.
Currently:
bisos.fileObj.fto — File Tree Object + tree walker. A generalization of the bash-based FTO facility (/bisos/core/bsip/bin/lcnObjectTree.libSh, seedFtoCommon.sh, ftoProc.sh). Marker-file conventions (_tree_, _treeProc_, _objectType_), branch/leaf classification, and a walker that recurses down a tree applying a command at each node. This is the first module and the reason the umbrella package exists.
bisos.fileObj.fp — File Parameter. Currently in bisos.b.fp; reserved slot for a future migration into this package.
bisos.fileObj.fv — File Variable. Currently in bisos.b.fv; reserved slot for a future migration.
bisos.fileObj is a python package that uses the PyCS-Framework.
Charter — Scope of This Package
This package is for filesystem-directory-backed data structures where the directory IS the object identity. If your thing needs a database, an in-memory structure, or a network resource, it doesn’t belong here.
The charter is deliberately narrow so the umbrella does not become a “small utility drawer.” Additions require that the thing being added:
Represents its identity and state as a filesystem directory.
Uses marker files (like _tree_) to make its type / role discoverable.
Sits at a similar level of abstraction as fto, fp, fv — primitive data structures, not higher-level constructs. Higher-level things (bisos.regfps over fp, bisos.siteRegistrars over regfps) belong in their own packages.
If a proposed module doesn’t meet all three, it goes in its own package or in a different umbrella.
Part of BISOS — ByStar Internet Services Operating System
Layered on top of Debian, BISOS (By* Internet Services Operating System) is a unified and universal framework for developing both internet services and software-service continuums that use internet services. See Bootstrapping ByStar, BISOS and Blee for information about getting started with BISOS.
BISOS is a foundation for The Libre-Halaal ByStar Digital Ecosystem which is described as a cure for losses of autonomy and privacy in a book titled: Nature of Polyexistentials
bisos.fileObj is part of BISOS. It is a standalone package that can be used independently of the full BISOS environment.
Installation
The sources for the bisos.fileObj pip package are maintained at: https://github.com/bisos-pip/fileObj.
The bisos.fileObj pip package is available at PyPI as https://pypi.org/project/bisos.fileObj
Installation With pip
pip install bisos.fileObj
Installation With pipx
pipx install bisos.fileObj
Usage
As a Python library
from bisos.fileObj import fto
branch = fto.FILE_TreeObject('/tmp/exampleTree')
branch.branchCreate()
leaf = fto.FILE_TreeObject('/tmp/exampleTree/leaf1')
leaf.leafCreate()
fto.treeRecurse(base='/tmp/exampleTree', command=['echo', 'hello'])
As a walker
Plant a branch .spcs at any branch directory in your tree, then invoke it with a command. The walker descends into every leaf beneath that branch and applies the command via each leaf’s _treeProc_.
See the bisos.dockerProc + bro_dockerfiles combination for a worked-through example.
Key Files
py3/bisos/fileObj/__init__.py — package init.
py3/bisos/fileObj/fto.py — FILE_TreeObject class, FileTreeItem enum, walker functions. Modeled on /bisos/core/bsip/bin/lcnObjectTree.libSh.
py3/bisos/fileObj/fto_csu.py — PyCS command surface exposing the walker (treeRecurse, effectiveBranches, etc.) as cs.Cmnd classes.
Documentation and Blee-Panels
bisos.fileObj is part of the ByStar Digital Ecosystem http://www.by-star.net.
See file:./panels/bisos.fileObj/_nodeBase_/fullUsagePanel-en.org for a starting point.
Support
Planned Improvements
Migrate b.fp and b.fv into bisos.fileObj.fp / bisos.fileObj.fv with compatibility shims in bisos.b.
Add a branch .spcs reference implementation that any tree can plant.
Extend _objectType_ dispatch so heterogeneous trees (mixed leaf types) are handled cleanly.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file bisos_fileobj-0.1.tar.gz.
File metadata
- Download URL: bisos_fileobj-0.1.tar.gz
- Upload date:
- Size: 38.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/5.1.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7189c7d4510ceb50418e87f00b0b5045eec0de6ce2f4270bf4890dcd27b34d53
|
|
| MD5 |
e53da88eecc3a8455cef99e60613a41f
|
|
| BLAKE2b-256 |
e9d10dceb9aa26fc8d8dae72ba5e03e3794bef09c47c923b6424568127d4da3d
|