Python wrapper library and CLI for papertrail API.
Project description
pypertrail
==========
|pypi| |travis| |doc| |pyup|
Python wrapper library and CLI for papertrail API.
Installation
------------
Install using pip:
.. code:: bash
export PAPERTRAIL_API_TOKEN=my_token
echo "token: my_token" > ~/.pypertrail.yml
echo "token: my_token" > /path/to/config
pypertrail --token my_token users list
Subcommands
~~~~~~~~~~~
.. code:: plain
Usage: pypertrail.py [OPTIONS] COMMAND [ARGS]...
Options:
-d, --debug Debug mode.
-p, --pretty Prettify JSON output.
-t, --token TEXT Papertrail API token.
-c, --conf TEXT Path to config (~/.pypertrail.yml).
--version Show the version and exit.
-h, --help Show this message and exit.
Commands:
accounts
archives
groups
saved_searches
search
systems
users
Accounts
~~~~~~~~
.. code:: plain
Usage: papertrail.py accounts [OPTIONS] COMMAND [ARGS]...
Options:
-h, --help Show this message and exit.
Commands:
list List account usage
Examples:
.. code:: bash
pypertrail --pretty archives list
Saved searches
~~~~~~~~~~~~~~
.. code:: plain
Usage: cli.py saved_searches [OPTIONS] COMMAND [ARGS]...
Options:
-h, --help Show this message and exit.
Commands:
create Create a saved search
delete Delete a saved search
list List saved_searches
show Show a saved search
update Update a saved search
Examples:
.. code:: bash
pypertrail saved_searches delete 1
pypertrail saved_searches show 1
pypertrail groups delete 1
pypertrail groups show 1
pypertrail search events
pypertrail search events --follow --color program
pypertrail search events --follow --json
Systems
~~~~~~~
.. code:: plain
Usage: papertrail.py systems [OPTIONS] COMMAND [ARGS]...
Options:
-h, --help Show this message and exit.
Commands:
create Create a saved search
delete Delete a system
join_group Join a group
leave_group Leave a group
list List systems
show Show a system
update Update a system
Examples:
.. code:: bash
pypertrail systems delete 1
pypertrail systems leave_group 1 --payload '{"group_id":10}'
pypertrail systems show 1
pypertrail users delete 1
pypertrail users list
Documentation
=============
- https://pypertrail.readthedocs.io
- http://help.papertrailapp.com/kb/how-it-works/http-api
History
=======
View the `changelog`_
Authors
=======
- `Quentin Rousseau`_
License
=======
.. code:: plain
Copyright (c) 2016 Quentin Rousseau <contact@quent.in>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
.. _changelog: https://github.com/kwent/pypertrail/blob/master/HISTORY.rst
.. _Quentin Rousseau: https://github.com/kwent
.. |pypi| image:: https://img.shields.io/pypi/v/pypertrail.svg
:target: https://pypi.python.org/pypi/pypertrail
.. |travis| image:: https://img.shields.io/travis/kwent/pypertrail.svg
:target: https://travis-ci.org/kwent/pypertrail
.. |doc| image:: https://readthedocs.org/projects/pypertrail/badge/?version=latest
:target: https://pypertrail.readthedocs.io/en/latest/?badge=latest
.. |pyup| image:: https://pyup.io/repos/github/kwent/pypertrail/shield.svg
:target: https://pyup.io/repos/github/kwent/pypertrail/
=======
History
=======
1.0.0 (2016-10-06)
------------------
* First release on PyPI.
==========
|pypi| |travis| |doc| |pyup|
Python wrapper library and CLI for papertrail API.
Installation
------------
Install using pip:
.. code:: bash
Subcommands
~~~~~~~~~~~
.. code:: plain
Usage: pypertrail.py [OPTIONS] COMMAND [ARGS]...
Options:
-d, --debug Debug mode.
-p, --pretty Prettify JSON output.
-t, --token TEXT Papertrail API token.
-c, --conf TEXT Path to config (~/.pypertrail.yml).
--version Show the version and exit.
-h, --help Show this message and exit.
Commands:
accounts
archives
groups
saved_searches
search
systems
users
Accounts
~~~~~~~~
.. code:: plain
Usage: papertrail.py accounts [OPTIONS] COMMAND [ARGS]...
Options:
-h, --help Show this message and exit.
Commands:
list List account usage
Examples:
.. code:: bash
Saved searches
~~~~~~~~~~~~~~
.. code:: plain
Usage: cli.py saved_searches [OPTIONS] COMMAND [ARGS]...
Options:
-h, --help Show this message and exit.
Commands:
create Create a saved search
delete Delete a saved search
list List saved_searches
show Show a saved search
update Update a saved search
Examples:
.. code:: bash
Systems
~~~~~~~
.. code:: plain
Usage: papertrail.py systems [OPTIONS] COMMAND [ARGS]...
Options:
-h, --help Show this message and exit.
Commands:
create Create a saved search
delete Delete a system
join_group Join a group
leave_group Leave a group
list List systems
show Show a system
update Update a system
Examples:
.. code:: bash
Documentation
=============
- https://pypertrail.readthedocs.io
- http://help.papertrailapp.com/kb/how-it-works/http-api
History
=======
View the `changelog`_
Authors
=======
- `Quentin Rousseau`_
License
=======
.. code:: plain
Copyright (c) 2016 Quentin Rousseau <contact@quent.in>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
.. _changelog: https://github.com/kwent/pypertrail/blob/master/HISTORY.rst
.. _Quentin Rousseau: https://github.com/kwent
.. |pypi| image:: https://img.shields.io/pypi/v/pypertrail.svg
:target: https://pypi.python.org/pypi/pypertrail
.. |travis| image:: https://img.shields.io/travis/kwent/pypertrail.svg
:target: https://travis-ci.org/kwent/pypertrail
.. |doc| image:: https://readthedocs.org/projects/pypertrail/badge/?version=latest
:target: https://pypertrail.readthedocs.io/en/latest/?badge=latest
.. |pyup| image:: https://pyup.io/repos/github/kwent/pypertrail/shield.svg
:target: https://pyup.io/repos/github/kwent/pypertrail/
=======
History
=======
1.0.0 (2016-10-06)
------------------
* First release on PyPI.