skillfed

pysmb

pysmb is an experimental SMB/CIFS library written in Python to support file sharing between Windows and Linux machines

pysmb v1.2.15 2.9M downloads/30d#2,856 on PyPI
Permissive license zlib/libpng Active released

What it is and what it does

pysmb is a pure-Python SMB/CIFS client library that lets you connect to and interact with Windows file shares and Samba folders from Python code. It handles the protocol negotiation and file operations needed to list directories, read files, write files, and manage shares on remote SMB servers—useful for cross-platform automation, backup scripts, and applications that need to integrate with Windows network infrastructure.

The library depends on pyasn1 for ASN.1 encoding and tqdm for progress indication. It is classified as Production/Stable and has been maintained since 2011, though it is labeled experimental in its description. The package supports both Windows and POSIX systems and carries no known security vulnerabilities.

Use it for:

  • Automate file transfers to and from Windows network shares in Python scripts or applications.
  • Build cross-platform backup or synchronization tools that access Samba or Windows file servers.
  • List and inspect remote SMB share contents programmatically without mounting the share locally.
  • Integrate Windows file sharing into headless Linux or cloud-based Python applications.
  • Test SMB/CIFS client behavior in CI/CD pipelines against mock or real SMB servers.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

pysmb implements the SMB/CIFS protocol to let Python applications read, write, and transfer files to and from Windows file shares and Samba folders.

Yes, if you need SMB/CIFS file access from Python and can tolerate the experimental label. Low install friction, permissive license, active maintenance, and no known vulnerabilities make it a reasonable choice. Verify that the protocol coverage and Python version support match your requirements before committing to production use.

Install

pysmb on PyPI

pip

pip install pysmb

uv

uv add pysmb

poetry

poetry add pysmb

Installing pysmb

Before you install

Low install friction with only 2 runtime dependencies (pyasn1, tqdm). Active maintenance with a release 6 days ago signals ongoing support.

License in practice

Licensed under zlib/libpng, a permissive license that allows commercial and private use with minimal restrictions—suitable for most projects.

Quickstart

pip install pysmb

import pysmb
# Connect to an SMB server with credentials and client name
# then list or transfer files on the remote share

Requires network access to an SMB/CIFS server; valid credentials and firewall rules are prerequisites for file operations.

Verify before relying

  • Whether Python 2 support (classifiers list 2.4–2.7) is still functional or merely legacy metadata.
  • Current test coverage and whether experimental status reflects incomplete protocol implementation.
  • Performance characteristics and suitability for high-throughput or large-file scenarios.
  • Specific API surface and which SMB/CIFS operations are fully implemented versus partial.

Package facts

License zlib/libpng (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — pyasn1, tqdm
Maintenance actively maintained — 6 days since the last release
First released
Downloads 2,863,617/month — #2,856 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pysmb-1.2.15-py3-none-any.whl

Keywords: windows, samba, cifs, sharing, ftp, smb, linux

Development Status :: 5 - Production/StableEnvironment :: ConsoleEnvironment :: Win32 (MS Windows)License :: OSI Approved :: zlib/libpng LicenseOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 2.4Programming Language :: Python :: 2.5Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Topic :: Communications :: File SharingTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Networking

Tags

smb file sharing pythoncifs client librarywindows network sharessamba file accessnetwork file transfer pythonsmb protocol implementationcross-platform file sharing
file-sharingnetwork-protocolwindows-interop

More Python Modules packages