SMB protocol wrapper for python
Project description
smbio
SMB protocol wrapper for python
Installation
pip install smbio
Usage
import smbio
connector = smbio.Connector(
url=r"\\localhost\Share",
username="Username",
password="StrongPa$$w0rd"
)
with (
connector.connect() as conn,
connector.mount(conn) as session,
connector.tree(session) as tree,
connector.open(tree, r"Directory\Subdirectory") as directory
):
files = smbio.glob(connector, directory, recurse=False)
for out in files:
if out.is_directory:
continue
with (
open(smbio.Path(out.path), mode="rb") as inp_file,
connector.open(tree, out.path) as out_file
):
out_file.write(inp_file.read())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
smbio-0.1.0.tar.gz
(4.1 kB
view hashes)
Built Distribution
smbio-0.1.0-py3-none-any.whl
(5.4 kB
view hashes)