Skip to main content

UNC network drive handling and mounting for Windows

Project description


A Python library for handling UNC paths on Windows.

With this library you can

  • Connect UNC directories to your Windows session
  • Connect UNC directories requiring authorization by providing credentials
  • Mount UNC directories (with or without credentials) to a local mount point
  • Disconnect/unmount UNC connections
  • Query existing UNC connections known by the Windows session

Full documentation is at

Report any issues on the package’s GitHub page:


To install:

$ pip install win_unc

Sneak Preview

Below is a simple example:

from win_unc import UncDirectoryMount, UncDirectory, DiskDrive

conn = UncDirectoryMount(UncDirectory(r'\home\shared'), DiskDrive('Z:'))
print 'Drive connected:', conn.is_mounted()

You can also provide credentials like this:

from win_unc import UncCredentials

unc = UncDirectory(r'\home\shared', UncCredentials('user', 'pwd'))
conn = UncDirectoryMount(unc, DiskDrive('Z:'))

Or just connect the path without mounting it:

from win_unc import UncDirectoryConnection

conn = UncDirectoryConnection(r'\home\shared')

Project details

Release history Release notifications

This version
History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date (24.0 kB) Copy SHA256 hash SHA256 Source None Sep 30, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page