Skip to main content

fs.smbfs star me

Source PyPI Actions Codecov Codacy License Versions Format GitHub issues Downloads Changelog

Requirements

PyFilesystem2 PyPI fs Source fs License fs
six PyPI six Source six License six
PySMB PyPI pysmb Source pysmb License pysmb

Installation

Install directly from PyPI, using pip :

$ pip install fs.smbfs

Usage

Opener

Use fs.open_fs to open a filesystem with an SMB FS URL:

import fs
smb_fs = fs.open_fs('smb://username:password@SAMBAHOSTNAME:port/share')

The opener can use either an IPv4 address or a NetBIOS hostname, using the NetBIOS name service to find the other token. Otherwise, if NetBIOS is not available, a new SMB connection can be established by using the IPv4 address and giving the hostname with the hostname URL parameter.

The following parameters can be passed as URL parameters: timeout, name-port, direct-tcp, hostname, and domain.

Constructor

import fs.smbfs
smb_fs = fs.smbfs.SMBFS(
    host, username="guest", passwd="", timeout=15,
    port=139, name_port=137, direct_tcp=False, domain=""
)

with each argument explained below:

  • host: either the host name (not the FQDN) of the SMB server, its IP address, or both in a tuple. If either the IP address or the host name is not given, NETBIOS is queried to get the missing data.
  • user: the username to connect with, defaults to "guest" for anonymous connection.
  • passwd: an optional password to connect with, defaults to "" for anonymous connection.
  • timeout: the timeout, in seconds, for NetBIOS and TCP requests.
  • port: the port the SMB server is listening on.
  • name_port: the port the NetBIOS naming service is listening on.
  • direct_tcp: set to True if the server is accessible directly through TCP, leave as False for maximum compatibility.
  • domain: the network domain to connect with, i.e. the workgroup on Windows. Usually safe to leave as empty string, the default.

Once created, the SMBFS filesystem behaves like any other filesystem (see the Pyfilesystem2 documentation), except if it was open in the root directory of the server, in which case the root directory of the SMBFS instance will be read-only (since SMB clients cannot create new shares).

Feedback

Found a bug ? Have an enhancement request ? Head over to the GitHub issue tracker of the project if you need to report or ask something. If you are filling in on a bug, please include as much information as you can about the issue, and try to recreate the same bug in a simple, easily reproducible situation.

Credits

fs.smbfs is developed and maintained by:

The following people contributed to fs.sshfs:

This project obviously owes a lot to the PyFilesystem2 project and all its contributors.

See also

  • fs, the core Pyfilesystem2 library
  • fs.archive, enhanced archive filesystems for Pyfilesystem2
  • fs.sshfs, Pyfilesystem2 over SSH using paramiko

Release files for fs.smbfs 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fs.smbfs 1.0.7
File Size Uploaded
fs.smbfs-1.0.7.tar.gz 19.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fs.smbfs 1.0.7
File Interpreter ABI Platform
fs.smbfs-1.0.7-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 34.3 kB

Release files / fs.smbfs-1.0.7.tar.gz

Download URL fs.smbfs-1.0.7.tar.gz
Size 19.0 kB
Tags Source
SHA-256 checksum
How to use checksums
862bca01a769bfa3c14fc2788d7492c13d529d0c717c37abe1568440a290707a
BLAKE2b-256 checksum
How to use checksums
db429b2a0610dde7b0784128553b8f35934fe136ab0e801aef92f3f5eae17254
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / fs.smbfs-1.0.7-py2.py3-none-any.whl

Download URL fs.smbfs-1.0.7-py2.py3-none-any.whl
Size 15.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
59b496559af50cd87a76ddb764e5bfcf244fa9d23e8b4f636a75608e261ebb3a
BLAKE2b-256 checksum
How to use checksums
b7e0955884b768a386f86951a159fc6d4f07ae96af443b218d39339c83e5600a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page