Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Obsolete twisted-based python async interface for old MS OneDrive API

Project Description


Deprecation Notice: this module uses obsolete API and wasn’t maintained for a while, use official onedrive-sdk-python module or something built on it instead.

Twisted-based python async interface for OneDrive API (version 5.0) (formerly known as SkyDrive).

API is mostly the same as in python-onedrive module (txOneDriveAPI class maps to OneDriveAPIWrapper, txOneDrive to OneDriveAPI) - methods are re-used directly from classes there, so more info on these can be found in that project.

Key difference from synchronous python-onedrive module is that all methods return twisted Deferred objects as scheduled to run by event loop, allowing to run multiple operations (like large file uploads) concurrently within one python process.

Service was called SkyDrive prior to 2014-02-19, when it got renamed to OneDrive. This package similarly renamed from txskydrive to txonedrive.

Usage Example

Following script will print listing of the root OneDrive folder, upload “test.txt” file there, try to find it in updated folder listing and then remove it.

from twisted.internet import defer, reactor
from txonedrive.api_v5 import txOneDrivePersistent

def do_stuff():
    api = txOneDrivePersistent.from_conf()

    # Print root directory ("me/skydrive") listing
    print list(e['name'] for e in (yield api.listdir()))

    # Upload "test.txt" file from local current directory
    file_info = yield api.put('test.txt')

    # Find just-uploaded "test.txt" file by name
    file_id = yield api.resolve_path('test.txt')

    # Check that id matches uploaded file
    assert file_info['id'] == file_id

    # Remove the file
    yield api.delete(file_id)

do_stuff().addCallback(lambda ignored: reactor.stop())

Note that txOneDriveAPIPersistent convenience class uses Microsoft LiveConnect authentication data from “~/.lcrc” file, which must be created as described in more detail in python-onedrive docs.


In case you’ve missed Deprecation Notice at the start of this file:

It’s a regular package for Python 2.7 (not 3.X).

Using pip is the best way:

% pip install txonedrive

If you don’t have it, use:

% easy_install pip
% pip install txonedrive

Alternatively (see also):

% curl | python
% pip install txonedrive

Or, if you absolutely must:

% easy_install txonedrive

But, you really shouldn’t do that.

Current-git version can be installed like this:

% pip install 'git+'

Note that to install stuff in system-wide PATH and site-packages, elevated privileges are often required. Use “install –user”, ~/.pydistutils.cfg or virtualenv to do unprivileged installs into custom paths.


Release History

Release History

This version
History Node


History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
txOneDrive-15.10.0.tar.gz (9.9 kB) Copy SHA256 Checksum SHA256 Source Oct 25, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting