--- id: smbprotocol version: "1.17.0" license: MIT license_treatment: permissive maintenance: active --- # smbprotocol — Interact with a server using the SMB 2/3 Protocol License: permissive · Maintenance: active · Downloads: 12.5M/mo ## What it is and what it does smbprotocol is a Python client library that implements the SMBv2 and SMBv3 network protocols, allowing your code to connect to and interact with Windows file shares, network printers, and other SMB-enabled resources. It negotiates protocol versions from SMB 2.0.2 up to SMB 3.1.1 (Windows 10/Server 2016 level) and handles authentication via NTLM or Kerberos, message signing, and encryption for SMBv3 connections. The library offers two interfaces: a low-level protocol API for fine-grained control and a higher-level interface that mirrors Python's built-in os and os.path functions for simpler file operations. Connections are pooled and DFS referrals are cached, making it suitable for everyday file-sharing tasks without verbose boilerplate. Use it for: - Access and manage files on Windows network shares from Linux or macOS without mounting SMB volumes. - Automate backup or synchronization of files from remote SMB servers in Python scripts. - Build cross-platform file management tools that work with network-shared files using the higher-level interface. - Authenticate to corporate SMB servers using Kerberos in domain environments. - Read or write files on network printers and other SMB-enabled devices programmatically. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. SMBv2 and SMBv3 client library for Python that enables reading, writing, and managing files on remote SMB/CIFS network shares with support for NTLM and Kerberos authentication. Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It fills a genuine need for SMB protocol support in Python with both simple and advanced interfaces. Install it if you need to interact with Windows file shares or other SMB resources from Python; the main gotcha is the Python 3.10+ requirement and optional Kerberos setup on Linux. ## Install pip install smbprotocol uv add smbprotocol poetry add smbprotocol ## Installing smbprotocol Before you install: Low install friction with a pure-Python wheel and only two runtime dependencies (cryptography and pyspnego). Actively maintained with last commit 2026-07-07. Kerberos support on Linux requires optional system libraries, but basic NTLM authentication works without them. License in practice: MIT license is permissive and places no restrictions on use, modification, or distribution in commercial or private projects. Quickstart: pip install smbprotocol from smbprotocol.connection import Connection, Dialects import uuid connection = Connection(uuid.uuid4(), "server", 445) connection.connect(Dialects.SMB_3_0_2) Requires Python 3.10 or later. Kerberos authentication on Linux requires additional system packages (libkrb5-dev) and python-gssapi; Windows Kerberos works out of the box via pyspnego. Verify before relying: - Whether DFS (Distributed File System) support is production-ready or still experimental as described in the excerpt. - Performance characteristics and scalability limits for concurrent connections or large file transfers. - Whether all SMB 3.1.1 features are fully implemented or if there are known gaps beyond the backlog mentioned. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 12.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags smb client python, smb2 smb3 protocol, network file sharing, cifs share access, windows file sharing, ntlm kerberos auth, remote file operations, smb-cifs, network-protocols, file-sharing [View on SkillFed](https://skillfed.io/packages/smbprotocol) · [View on PyPI](https://pypi.org/project/smbprotocol/)