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 details)
Built Distribution
smbio-0.1.0-py3-none-any.whl
(5.4 kB
view details)
File details
Details for the file smbio-0.1.0.tar.gz
.
File metadata
- Download URL: smbio-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
488eab3de1f23c5d006027d6ce14b782417c2b8cbc280dcbaf978ceade4891d0
|
|
MD5 |
eee358919a3217b08f254024cfed42be
|
|
BLAKE2b-256 |
f4e1f2c4688228d10d3dfa0f802910b5e3cce9b20c6ca8345fcb5932476e2497
|
File details
Details for the file smbio-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: smbio-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
093ebf07bc058486bc4db45eea0988902c9f6a9e319dae9c3dd38c9fd03dcfc4
|
|
MD5 |
bf9b0af6f8122f1cafeacbd2c7260d07
|
|
BLAKE2b-256 |
c1f04af163e7f98e3ae3c680e5511406b6f03c5e0ab020561ce904195700bb37
|