Skip to main content

Papertrail log archives downloader

Project description

Papertrail log archives downloader

ppad, stands for PaPertrail log Archives Downloader, can download log archives from Papertrail.

The downloading process works on multi-thread and checking API's Rate Limits from the header so you can download the archives fastly and safely.

Install

Please use pip

pip install ppad

Usage

Please set your token to the environment variable named PAPERTRAIL_API_TOKEN to run the script.

$ PAPERTRAIL_API_TOKEN=YOUR_TOKEN ppad # Download all the log archives
$ PAPERTRAIL_API_TOKEN=YOUR_TOKEN ppad 2020-01-01~2020-02-01 # Download the archives which have logged January 2020
$ PAPERTRAIL_API_TOKEN=YOUR_TOKEN ppad 2020-01-01~ # Specified the since date (including the since date file)
$ PAPERTRAIL_API_TOKEN=YOUR_TOKEN ppad ~2020-02-01 # Specified the until date (NOT including the until date file)

By running the above command(s), you can get the log archives named such as 2020-01-01-XX.tsv.gz in the current directory.

The date format is ISO-8601 format supported.

(The script uses dateutil.isoparse)

Project details


Download files

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

Source Distribution

ppad-0.0.11.tar.gz (10.7 kB view hashes)

Uploaded Source

Built Distribution

ppad-0.0.11-py3-none-any.whl (11.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page