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

A simple set of Python classes to facilitate tailing of one or more files via SSH. At the moment it only supports key-based SSH’ing.

Quick installation

Install from PyPI:

> easy_install -U python-sshtail

Tailing a single file

from sshtail import SSHTailer
from time import sleep

# "1.2.3.4" is the IP address or host name you want to access
tailer = SSHTailer('1.2.3.4', '/var/log/path/to/my/logfile.log')

try:
    while 1:
        for line in tailer.tail():
            print line

        # wait a bit
        time.sleep(1)

except:
    tailer.disconnect()

Tailing multiple files

from sshtail import SSHMultiTailer

tailer = SSHMultiTailer({
    '1.2.3.4': ['/path/to/log1.log', '/path/to/log2.log'],
    '4.3.2.1': ['/path/to/log3.log'],
})

# will run until it receives SIGINT, after which it will
# automatically catch the exception, disconnect from the
# remote hosts and perform cleanup

for host, filename, line in tailer.tail():
    print "%s:%s - %s" % (host, filename, line)

Using a custom private key

from sshtail import SSHMultiTailer, load_dss_key

# if no path's specified for the private key file name,
# it automatically prepends /home/<current_user>/.ssh/
# and for RSA keys, import load_rsa_key instead.

tailer = SSHMultiTailer({
        '1.2.3.4': ['/path/to/log1.log', '/path/to/log2.log'],
        '4.3.2.1': ['/path/to/log3.log'],
    },
    private_key=load_dss_key('identity'))

for host, filename, line in tailer.tail():
    print "%s:%s - %s" % (host, filename, line)
Release History

Release History

0.0.2

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.0.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

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
python_sshtail-0.0.2-py2.7.egg (7.2 kB) Copy SHA256 Checksum SHA256 2.7 Egg Sep 19, 2011
python-sshtail-0.0.2.tar.gz (4.7 kB) Copy SHA256 Checksum SHA256 Source Sep 19, 2011

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