vsmbfs 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
vsmbfs/__init__.py ADDED
@@ -0,0 +1,12 @@
1
+ """fsspec filesystem backed by the vectorized :mod:`vsmb` client."""
2
+
3
+ import fsspec
4
+ from vfsi_fsspec import install_fsspec_blockcache_compat
5
+ from vsmb import __version__ as __version__
6
+
7
+ from ._fs import SmbFileSystem, VsmbFile, VsmbFileSystem
8
+
9
+ __all__ = ["SmbFileSystem", "VsmbFile", "VsmbFileSystem"]
10
+
11
+ fsspec.register_implementation("vsmbfs", VsmbFileSystem)
12
+ install_fsspec_blockcache_compat(VsmbFileSystem)
vsmbfs/__init__.pyi ADDED
@@ -0,0 +1,6 @@
1
+ from ._fs import SmbFileSystem as SmbFileSystem
2
+ from ._fs import VsmbFile as VsmbFile
3
+ from ._fs import VsmbFileSystem as VsmbFileSystem
4
+
5
+ __version__: str
6
+ __all__: list[str]
vsmbfs/_fs.py ADDED
@@ -0,0 +1,31 @@
1
+ """SMB-specific facade over the shared VFSI fsspec engine."""
2
+
3
+ from vfsi_fsspec import VfsiFile
4
+ from vfsi_fsspec import VfsiFileSystem as _VfsiFileSystem
5
+ from vsmb import _native
6
+
7
+
8
+ class VsmbFileSystem(_VfsiFileSystem):
9
+ """Vectorized SMB2/3 filesystem."""
10
+
11
+ protocol = "vsmbfs"
12
+ _native_module = _native
13
+ _supported_backends = frozenset({"smb"})
14
+
15
+ def __init__(self, host="127.0.0.1", root="", share=None, **kwargs):
16
+ backend = kwargs.pop("backend", "smb")
17
+ if backend != "smb":
18
+ raise ValueError("vsmbfs only supports backend='smb'")
19
+ super().__init__(
20
+ host=host,
21
+ root=root,
22
+ backend="smb",
23
+ share=share,
24
+ **kwargs,
25
+ )
26
+
27
+
28
+ SmbFileSystem = VsmbFileSystem
29
+ VsmbFile = VfsiFile
30
+
31
+ __all__ = ["SmbFileSystem", "VsmbFile", "VsmbFileSystem"]
vsmbfs/_fs.pyi ADDED
@@ -0,0 +1,17 @@
1
+ from typing import Any, Optional
2
+
3
+ from vfsi_fsspec import VfsiFile, VfsiFileSystem
4
+
5
+ VsmbFile = VfsiFile
6
+
7
+ class VsmbFileSystem(VfsiFileSystem):
8
+ protocol: str
9
+ def __init__(
10
+ self,
11
+ host: str = "127.0.0.1",
12
+ root: str = "",
13
+ share: Optional[str] = None,
14
+ **kwargs: Any,
15
+ ) -> None: ...
16
+
17
+ SmbFileSystem = VsmbFileSystem
vsmbfs/py.typed ADDED
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.4
2
+ Name: vsmbfs
3
+ Version: 0.1.0
4
+ Summary: VFSI fsspec filesystem backed by the vectorized vsmb client
5
+ Author-email: Ming Chen <v.mingchen@gmail.com>
6
+ License-Expression: MIT OR Apache-2.0
7
+ Project-URL: Homepage, https://github.com/vmingchen/vnfs
8
+ Project-URL: Documentation, https://github.com/vmingchen/vnfs/tree/main/adapters/vsmbfs
9
+ Project-URL: Repository, https://github.com/vmingchen/vnfs
10
+ Project-URL: Issues, https://github.com/vmingchen/vnfs/issues
11
+ Project-URL: Changelog, https://github.com/vmingchen/vnfs/blob/main/CHANGELOG.md
12
+ Keywords: vfsi,fsspec,smb,smb2,smb3,filesystem,vectorized-io
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: System Administrators
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Typing :: Typed
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ Requires-Dist: fsspec>=2024.12.0
22
+ Requires-Dist: vfsi-fsspec<0.2,>=0.1
23
+ Requires-Dist: vsmb<0.2,>=0.1
24
+ Provides-Extra: test
25
+ Requires-Dist: pytest; extra == "test"
26
+ Provides-Extra: dev
27
+ Requires-Dist: black; extra == "dev"
28
+ Requires-Dist: build; extra == "dev"
29
+ Requires-Dist: mypy; extra == "dev"
30
+ Requires-Dist: pytest; extra == "dev"
31
+ Requires-Dist: ruff; extra == "dev"
32
+ Requires-Dist: twine; extra == "dev"
33
+
34
+ # vsmbfs
35
+
36
+ `vsmbfs` is the fsspec adapter for the low-level `vsmb` vector SMB2/3 client.
37
+
38
+ ```sh
39
+ python -m pip install vsmbfs
40
+ ```
41
+
42
+ ```python
43
+ import fsspec
44
+ import vsmbfs
45
+
46
+ fs = fsspec.filesystem(
47
+ "vsmbfs",
48
+ host="files.example",
49
+ share="data",
50
+ username="user",
51
+ password="secret",
52
+ )
53
+ print(fs.ls("/"))
54
+ ```
55
+
56
+ Bulk fsspec operations and coordinated `open_files` buffering use VFSI vector
57
+ operations so independent SMB requests can be issued in bounded batches.
@@ -0,0 +1,10 @@
1
+ vsmbfs/__init__.py,sha256=rkOuNzWloKZ-iy0Ab3U5OIwA2VbbKWdazFF55GgSwkg,409
2
+ vsmbfs/__init__.pyi,sha256=SPdAWDsFpwHCdO1pQpBWgq4sw1WW_7UvGcm9O_42dyM,173
3
+ vsmbfs/_fs.py,sha256=vzLB-fIPe_2v5nYxQ2fOFvQVtEGJSOc-nbFovQK_aU8,844
4
+ vsmbfs/_fs.pyi,sha256=pECiwWNFrAeafAQmWdsY4HdvBwfclym2BGl0Bny0ZWw,361
5
+ vsmbfs/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
6
+ vsmbfs-0.1.0.dist-info/METADATA,sha256=bx0ExpFfH3M_IM3oX9rYoSp6MGavvhVPlK_EJB8vHww,1821
7
+ vsmbfs-0.1.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
8
+ vsmbfs-0.1.0.dist-info/entry_points.txt,sha256=Vbvk8ehtCM8uwkikwyr_VX8BDqw-zQMLKyeoXX84W0E,46
9
+ vsmbfs-0.1.0.dist-info/top_level.txt,sha256=zO8jB-po6o9coWHM802-n9bq88IiKDi4FpiE-nF92b8,7
10
+ vsmbfs-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [fsspec.specs]
2
+ vsmbfs = vsmbfs:VsmbFileSystem
@@ -0,0 +1 @@
1
+ vsmbfs