This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Python wrapper for managing multi-host uploads and downloads using plowshare. After uploading it returns an object with links to the file it uploaded. This wrapper contains both a Python module and a command line tool.

Installation

Check INSTALL.rst for installation instructions.

Module Usage

Upload

This module is composed of a single class, which can be used to upload a file to multiple hosts at once. Example:

import plowshare

p = plowshare.Plowshare()
p.upload('/home/jessie/documents/README.rst', 3)

The above example uploads the given file to three different hosts, chosen at random from a predefined list. This list is a subset of the available plowshare modules, limited to the ones that allow anonymous access. You can check it in plowshare/hosts.py

You can also specify a list of hosts (plowshare module names) to use:

import plowshare

p = plowshare.Plowshare(['turbobit', 'multiupload', 'exoshare', 'rghost', 'bayfiles'])
p.upload('/home/jessie/documents/README.rst', 3)

The upload method returns an array of objects with the hosts and URLs to which it uploaded the file. If some of the uploads fail, it doesn’t return an URL, but an error flag instead.

Here’s an example:

[
    { "host_name": "mediafire",  "url":   "http://www.mediafire.com/?qorncpzfe74s9" },
    { "host_name": "rapidshare", "url":   "http://rapidshare.com/files/130403982" },
    { "host_name": "anonfiles",  "error": true }
]

Download

You can also download uploaded files, by providing the object that the upload method generated, and the directory and filename where to download the file. This method returns an object that contains the path where the file was downloaded, or an object with the error message. Example:

import plowshare

uploads = [
    { 'host_name': 'mediafire',  'url':'http://www.mediafire.com/?qorncpzfe74s9' },
    { 'host_name': 'rapidshare', 'url':'http://rapidshare.com/files/130403982' },
    { 'host_name': 'anonfiles',  'error':true }
]

p = plowshare.Plowshare()
p.download(info, '/tmp/', 'readme_copy.rst')

If multiple sources are provided, they are used as failovers for downloading the file. If at least one source is successful, the others won’t be attempted and download() will return an object with the full path filename and the first host it successfuly downloaded it from:

{ "host_name": "mediafire", "filename": "/tmp/readme_copy.rst" }

There are multiple errors that can occur. Here’s a list of the currently supported errors:

{ "error": "no valid sources" }
Release History

Release History

0.3.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
plowshare-0.3.6.tar.gz (6.4 kB) Copy SHA256 Checksum SHA256 Source Dec 4, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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