NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1405 most downloaded on PyPI
Interact with a server using the SMB 2/3 Protocol
Last release 3 months ago
07 Jul 2026
Release timing varies
gaps range from 2 weeks to 1.2 years
Nearly every release is documented
notes for 30 of 30 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
40 releases · first in 2018
Bump version post PyPI release by @jborean93 in #342
hostname_override kwarg to smbprotocol.Session that can override the hostname used in the SPN for authenticationquery_directory on a directoryFlagField str representation when the flag_type contains a dunder attribute with an int valueConnection.client_security_mode to be SMB2_NEGOTIATE_SIGNING_REQUIRED when server reports signing is requiredsmbclient.rmtree and ignore_errors not working with various exceptionssmbclient.scandir return a context manager that can close SMB resources. This method should now be called like
with smbclient.scandir(...) as scan_gen:
for entry in scan_gen:
...STATUS_NO_SUCH_FILE during smbclient.scandir when using a pattern that matches no file in the specified pathFull Changelog: v1.16.1...v1.17.0
One column per quarter.
Fix memory leaks in Structure and subclasses by converting lambda default values to static methods and using weakref.proxy to prevent circular referen
Structure and subclasses by converting lambda default values to static methods and using weakref.proxy to prevent circular referencessmbclient.shutil.copyfile to fallback to client-side copy when server-side SMB copy is not supported (STATUS_NOT_SUPPORTED)ECONNABORTED socket error during connection teardownFull Changelog: v1.16.0...v1.16.1
Bump version by @jborean93 in #310
Full Changelog: v1.15.0...v1.16.0
auth_protocol and require_signing to the various smbclient kwargs. This aligns the kwargs with the ones that can be provided to register_session directlySMBDirEntry.is_symlink(), returned by smbclient.scandir() to no longer require any extra SMB calls, this object is returned by APIs such as `STATUS_STOPPED_ON_SYMLINK response that contains no reparse buffer data
smbclient.shutil.copy and smbclient.shutil.copy2 to properly pass along the connection kwargs to the internal copy callFix Impacket logoff session id check by @jborean93 in #291
smbclient.liststreams to enumerate ADS streams by @mon in #294smbclient.open_file by @mon in #295Full Changelog: v1.14.0...v1.15.0
Bump version and update dev deps by @jborean93 in #276
SMBDirEntryInformation.last_write_time is now annotated as datetime.datetime. Previously, it was datetime.date. #279Full Changelog: v1.13.0...v1.14.0
Stop using datetime.datetime.utcfromtimestamp() as it has been deprecated
smb_info on SMBDirEntry which returns a named tuple SMBDirEntryInformation containing metadata already retrieved in the scandir operation.
stat() to retrieve data like the file attributes or datetime fields that is already availableDateTimeField values are set to UTC timezones as FILETIME values are in UTCdatetime.datetime.utcfromtimestamp() as it has been deprecatedsmbprotocol.connection.Connection.disconnect() now waits (with a timeout) for the message processing threads to be stopped before returning.0xFFFFFFFF for related compound requestsshutil.copyfile is opened with share_access="r" for better compatibility with files already opened by something elseFull Changelog: v1.12.0...v1.13.0
Bump version by @jborean93 in #241
DiskFull error and message for the NTSTATUS code 0xC000007F - #245Full Changelog: v1.11.0...v1.12.0
Fix up CI problems due to new black rules by @jborean93 in #210
logging.NullHandler() being set in the root smbprotocol namespacesmbclient.shutil.copytreeFull Changelog: v1.10.1...v1.11.0
Raise the original BadNetworkName error if the server doesn't indicate it supports DFS or FSDriverRequired was raised trying to lookup the DFS informa
BadNetworkName error if the server doesn't indicate it supports DFS or FSDriverRequired was raised trying to lookup the DFS information - #196Full Changelog: v1.10.0...v1.10.1
Fix copy2 docstring. by @mikekokuba in #180
Full Changelog: v1.9.0...v1.10.0
pyproject.tomlsrc based structure rather than including it in the project rootsmbclient.copyfile to copy files on the same server and not just the same shareFix connection cache reuse for some DFS referral requests
smbclient.path to the smbclient import allowing import smbclient; smbclient.path.func()Set additional_information field in SMB2SetInfoRequest to a flags field rather than a single enum as per protocol docs
additional_information field in SMB2SetInfoRequest to a flags field rather than a single enum as per protocol docsAdd missing FileAttributes enum values
FileAttributes enum valuesFileAttributes to be non-strict allowing unknown values in the future to be parsed without an errorRaises ObjectPathNotFound if a DFS referral is required but not referrals are available
ObjectPathNotFound if a DFS referral is required but not referrals are available (https://github.com/jborean93/smbprotocol/pull/149)Added support for 256bit keyed encryption ciphers
SMB2_NETNAME_NEGOTIATE_CONTEXT_ID with the negotiate requestindex_number in FileInternalInformation to be an unsigned integer to match the other structuresImprove connection health checks to reduce the occurances of an infinite deadlock
create_action to the Open object that describes how the file was openedfollow_symlinks option to SMBDirEntry.from_path to control whether the entry is based on the path or the link target (if there is one)Fix up cached credential logic when setting domain_controller in the initial config singleton
domain_controller in the initial config singletonRemove print() statement that was used during testing
print() statement that was used during testingDropped support for Python 2.7 and 3.5
require_signing kwarg to smbclient.register_session() to allow the caller to control whether signing is required on the connection or notOverflowError when handling FILETIME values beyond the year 9999 - caps the value to 9999-12-31 due to a Python limitationSTATUS_INVALID_PARAMETER response for certain read/write lengthsUnified DFS path handling when using any API that uses a transaction to open the file
smbclient.rename and smbclient.replacesmbclient.rename to work with directoriessmbclient.scandir will continue to use the connection cache when getting stat information of a dir entrysmbclient.shutil.rmtree will continue to use the connection cache when removing child entriesAdded smbprotocol.exceptions.SMBConnectionClosed that is raised when trying to send or receive data on a connection that has been closed
smbprotocol.exceptions.SMBConnectionClosed that is raised when trying to send or receive data on a connection that has been closedsmbprotocol.exceptions.WrongPassword that is raised when some servers indicate the password is not correct or the account is locked outsmbclientSMBConnectionClosedFixed up secure negotiation logic when connecting to older SMB dialects
ClientConfig option require_secure_negotiate to globally turn off secure negotiation if the client wishesntlm or kerberos authentication when the server response with the initial SPNEGO mech list tokenChanged initial credit request from 256 to 64 when creating the SMB session
256 to 64 when creating the SMB session
smbclient requires more credits to perform an operation it will request it automaticallywrite() in smbclient.open_file() to be able to write bytes greater than the max_write_sizePipeBusy exception for STATUS_PIPE_NOT_AVAILABLE 0xC00000AD error responseslen(responses) - 1 credits than what the server actually given causing errors when the client ran out of credits without it knowingauth_protocol to Session, ClientConfig, and register_session() to control what authentication protocol is used
negotiate (default), kerberos, or ntlm where negotiate selects kerberos or ntlm depending on what's availableAdded experimental support for DFS shares when using smbclient function
smbclient functionsmbclient.ClientConfig() to set global default options on new connectionssmbprotocol.headernull_terminated option for a TextField valueSpeed up logging statements for large messages like a read and write message
NtStatus value to make it easier to catch only specific exceptionsSTATUS_NETWORK_NAME_DELETEDSTATUS_NOT_FOUNDSTATUS_PATH_NOT_COVEREDSTATUS_DFS_UNAVAILABLESTATUS_SERVER_UNAVAILABLENothing published for this version
Nothing published for this version
Fix issue when reading a large file that exceeds 65KB and raises STATUS_END_OF_FILE.
STATUS_END_OF_FILE.listdir, scandir, walk would only enumerate a subset of entries in a directories with lots of sub files/foldersDeprecated smbprotocol.query_info in favour of smbprotocol.file_info, query_info will be removed in the next major release
smbclient package that provides a higher level API for interactive with SMB serverssmbprotocol.query_info in favour of smbprotocol.file_info, query_info will be removed in the next major releaseFileSystemWatcher in change_notify.py to provider a way to watch for changes on the SMB filesystem.cancel() method onto a Request to cancel an SMB request on the serverNothing published for this version
Fix various deprecated regex escape patterns
Fix initial negotiate message not setting connection timeout value
This is the initial main release for smbprotocol. It contains the following features
This is the initial main release for smbprotocol. It contains the following features
Changed Open open function to create to better reflect the SMB message being sent and align with other functions.
Changed Open open function to create to better reflect the SMB message being sent and align with other functions.
Tidied up the socket locking for multithreading situations, better handles deadlocks on failures
Moved global timeout setting to just the negotiate/connect phase Added special check for NTLM auth handler to fail with better exception Added more Nt
Moved global timeout setting to just the negotiate/connect phase Added special check for NTLM auth handler to fail with better exception Added more NtStatus error codes
Nothing published for this version
Moved away from running socket listener as a separate thread. This change uses non blocking sockets to achieve the same result but without the overhea
Moved away from running socket listener as a separate thread. This change uses non blocking sockets to achieve the same result but without the overhead of threading.
Also fixes opening the root share directory in an open and adds some more NtStatus codes.
Fixes issue with signature verification of STATUS_PENDING responses. These messages are not signed and needed to be skipped in the signature verificat
Fixes issue with signature verification of STATUS_PENDING responses. These messages are not signed
and needed to be skipped in the signature verification stage.
Also made python-gssapi an optional dependency, users can install it manually by running pip install smbprotocol[kerberos] if required.
First dev release to PyPi, designed to be a tester release for people who want to try it out.
First dev release to PyPi, designed to be a tester release for people who want to try it out.
Your coding agent can read these notes before it upgrades. Set up the MCP server →