Registry / storage / fs-smbfs

fs-smbfs

JSON →
library1.0.7pypypiunverified

Pyfilesystem2 filesystem for accessing SMB (Samba) shares using pysmb. Current version 1.0.7. Low release cadence; last release was in 2022.

pip install fs-smbfs
INSTALL
IMPORT
SIG · FS-SMBFS
F
fs-smbfs
storagepythonv1.0.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SMBFS
from fs.smbfs import SMBFS
from fs.smbfs import SMBFS

Connect to an SMB share and list root directory.

import os from fs.smbfs import SMBFS smb_host = os.environ.get('SMB_HOST', 'localhost') smb_user = os.environ.get('SMB_USER', 'guest') smb_pass = os.environ.get('SMB_PASS', '') smb_share = os.environ.get('SMB_SHARE', 'share') fs = SMBFS(smb_host, username=smb_user, password=smb_pass, share=smb_share) print(fs.listdir('/')) fs.close()
Debug
Known issues
gotchaThe SMBFS constructor does not support timeout parameter. Connection may hang indefinitely if server is unreachable.
fix
Use a timeout context manager or set socket timeout before calling SMBFS.
affects: all
deprecatedThis library targets Pyfilesystem2 (fs) and is not compatible with Pyfilesystem3. Using with fs>=2.5 is safe.
fix
Pin fs to <3.0 in your requirements.
affects: all
gotchaThe SMBFS implementation does not support Unicode characters in file paths on some SMB servers. May raise UnicodeEncodeError.
fix
Ensure SMB server supports UTF-8 or encode paths as bytes.
affects: all
Upgrade
Version history
1.0.7latest on PyPI · released Jan 9, 2023
Audit
Dependencies
fsrequiredPyfilesystem2 core library
pysmbrequiredSMB protocol implementation
Agent activity
23 hits · last 30 days
node
22
OpenAI (training)
1
Resources
fs-smbfs — pip install fs-smbfs · libregistry