tomcatmanager


Nametomcatmanager JSON
Version 7.0.1 PyPI version JSON
download
home_page
SummaryA command line tool and python library for managing a tomcat server.
upload_time2023-12-03 04:42:28
maintainer
docs_urlNone
author
requires_python>=3.8
licenseCopyright (c) 2007 Jared Crapo 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.
keywords java tomcat command line
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            tomcatmanager
=============

.. image:: https://img.shields.io/pypi/v/tomcatmanager?label=latest%20version
      :target: https://pypi.python.org/pypi/tomcatmanager
      :alt: latest version
.. image:: https://img.shields.io/pypi/pyversions/tomcatmanager
      :target: https://pypi.python.org/pypi/tomcatmanager
      :alt: supported python versions
.. image:: https://img.shields.io/badge/license-MIT-orange
      :target: https://github.com/tomcatmanager/tomcatmanager/blob/main/LICENSE
      :alt: license
.. image:: https://img.shields.io/github/actions/workflow/status/tomcatmanager/tomcatmanager/quicktest.yml?branch=main&label=build%20%28main%29
      :target: https://github.com/tomcatmanager/tomcatmanager/tree/main
      :alt: main branch build status
.. image:: https://img.shields.io/github/actions/workflow/status/tomcatmanager/tomcatmanager/quicktest.yml?branch=develop&label=build%20%28develop%29
      :target: https://github.com/tomcatmanager/tomcatmanager/tree/develop
      :alt: develop branch build status
.. image:: https://img.shields.io/codecov/c/github/tomcatmanager/tomcatmanager/main?token=3YbxJ1PKwJ
      :target: https://codecov.io/gh/tomcatmanager/tomcatmanager
      :alt: code coverage
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
      :target: https://github.com/astral-sh/ruff
      :alt: Ruff
.. image:: https://img.shields.io/badge/code%20style-black-000000
      :target: https://github.com/psf/black
      :alt: code style black
.. image:: https://img.shields.io/github/actions/workflow/status/tomcatmanager/tomcatmanager/doctest.yml?branch=main&label=docs%20%28main%29
      :target: http://tomcatmanager.readthedocs.io/en/stable
      :alt: main branch documentation status
.. image:: https://img.shields.io/github/actions/workflow/status/tomcatmanager/tomcatmanager/doctest.yml?branch=main&label=docs%20%28develop%29
      :target: https://tomcatmanager.readthedocs.io/en/develop/
      :alt: develop branch documentation status


If you use Apache Tomcat for any sort of development work you’ve probably deployed
lots of applications to it. There are a several ways to get your war files deployed:

- use the `Tomcat Manager <https://tomcat.apache.org/tomcat-9.0-doc/manager-howto.html>`_
  application in your browser
- use the `Tomcat Ant Tasks <https://cwiki.apache.org/confluence/display/tomcat/AntDeploy>`_ included with
  Tomcat
- use `Cargo <https://codehaus-cargo.github.io/>`_ and its plugins for ant and maven

Here's another way: a command line tool and python library for managing a Tomcat server.


How Do I Use It?
----------------

This package installs a command line utility called ``tomcat-manager``. It's
easily scriptable using your favorite shell:

.. code-block:: text

   $ tomcat-manager --user=ace --password=newenglandclamchowder \
   http://localhost:8080/manager deploy local sample.war /sampleapp
   $ echo $?
   0

There is also an interactive mode:

.. code-block:: text

   $ tomcat-manager
   tomcat-manager>connect http://localhost:8080/manager ace
   Password:
   --connected to http://localhost:8080/manager as ace
   tomcat-manager>list
   Path                     Status  Sessions Directory
   ------------------------ ------- -------- ------------------------------------
   /                        running        0 ROOT
   /sampleapp               stopped        0 sampleapp##9
   /sampleapp               running        0 sampleapp##8
   /host-manager            running        0 /usr/share/tomcat8-admin/host-manage
   /manager                 running        0 /usr/share/tomcat8-admin/manager

And for the ultimate in flexibility, you can use the python package directly:

.. code-block:: python

   >>> import tomcatmanager as tm
   >>> tomcat = tm.TomcatManager()
   >>> r = tomcat.connect(url="http://localhost:8080/manager",
   ... user="ace", password="newenglandclamchowder")
   >>> tomcat.is_connected
   True
   >>> r = tomcat.stop("/someapp")
   >>> r.ok
   False
   >>> r.status_message
   'No context exists named /someapp'


What Can It Do?
---------------

Tomcatmanager has the following capabilities, all available from the command line,
interactive mode, and as a python library:

- **deploy** - deploy a war file containing a tomcat application in the tomcat server
- **redeploy** - remove the application currently installed at a given path and
  install a new war file there
- **undeploy** - remove an application from the tomcat server
- **start** - start a tomcat application that has been deployed but isn't running
- **stop** - stop a tomcat application and leave it deployed on the server
- **reload** - stop and start a tomcat application
- **sessions** - show active sessions for a particular tomcat application
- **expire** - expire idle sessions
- **list** - show all installed applications
- **serverinfo** - show information about the server, including tomcat version, OS
  version and architecture, and jvm version
- **status** - show server status information in xml format
- **vminfo** - show diagnostic information about the jvm
- **threaddump** - show a jvm thread dump
- **resources** - show the global jdni resources configured in tomcat
- **findleakers** - show tomcat applications that leak memory
- **sslconnectorciphers** - show tls ciphers configured for each connector
- **sslconnectorcerts** - show tls certificate chain for each virtual host
- **sslconnectortrustedcerts** - show trusted certificates for each virtual host
- **sslreload** - reload tls certificate and key files


Documentation
-------------

Complete documentation for the last released version is available at
`<http://tomcatmanager.readthedocs.io/en/stable/>`_. It includes material
showing how to use ``tomcat-manager`` from the command line or using
interactive mode. There is also a walkthrough of how to use the API and an
API reference.

Documentation is also built from the `develop
<https://github.com/tomcatmanager/tomcatmanager/tree/develop>`_ branch, and
published at `<https://tomcatmanager.readthedocs.io/en/latest/>`_. The develop
branch may not yet be released to PyPi, but you can see the documentation for what's
coming up in the next release.


Installation
------------

You'll need Python >= 3.8. Install using pip:

.. code-block:: text

   $ pip install tomcatmanager

Works on Windows, macOS, and Linux.

Works with Tomcat >= 8.5 and <= 10.1.


Tomcat Configuration
--------------------

This library and associated tools do their work via the Tomcat Manager
web application included in the Tomcat distribution. You will need to
configure authentication in ``tomcat-users.xml`` with access to the
``manager-script`` role:

.. code-block:: xml

   <tomcat-users>
     ...
     <role rolename="manager-script"/>
     <user username="ace" password="newenglandclamchowder" roles="manager-script"/>
     ...
   </tomcat-users>


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "tomcatmanager",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "java,tomcat,command line",
    "author": "",
    "author_email": "Jared Crapo <jared@kotfu.net>",
    "download_url": "https://files.pythonhosted.org/packages/1f/65/d93427def594263cc132ce7a8bcf4192fe020648319a4eab9f8dc61b34b7/tomcatmanager-7.0.1.tar.gz",
    "platform": null,
    "description": "tomcatmanager\n=============\n\n.. image:: https://img.shields.io/pypi/v/tomcatmanager?label=latest%20version\n      :target: https://pypi.python.org/pypi/tomcatmanager\n      :alt: latest version\n.. image:: https://img.shields.io/pypi/pyversions/tomcatmanager\n      :target: https://pypi.python.org/pypi/tomcatmanager\n      :alt: supported python versions\n.. image:: https://img.shields.io/badge/license-MIT-orange\n      :target: https://github.com/tomcatmanager/tomcatmanager/blob/main/LICENSE\n      :alt: license\n.. image:: https://img.shields.io/github/actions/workflow/status/tomcatmanager/tomcatmanager/quicktest.yml?branch=main&label=build%20%28main%29\n      :target: https://github.com/tomcatmanager/tomcatmanager/tree/main\n      :alt: main branch build status\n.. image:: https://img.shields.io/github/actions/workflow/status/tomcatmanager/tomcatmanager/quicktest.yml?branch=develop&label=build%20%28develop%29\n      :target: https://github.com/tomcatmanager/tomcatmanager/tree/develop\n      :alt: develop branch build status\n.. image:: https://img.shields.io/codecov/c/github/tomcatmanager/tomcatmanager/main?token=3YbxJ1PKwJ\n      :target: https://codecov.io/gh/tomcatmanager/tomcatmanager\n      :alt: code coverage\n.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\n      :target: https://github.com/astral-sh/ruff\n      :alt: Ruff\n.. image:: https://img.shields.io/badge/code%20style-black-000000\n      :target: https://github.com/psf/black\n      :alt: code style black\n.. image:: https://img.shields.io/github/actions/workflow/status/tomcatmanager/tomcatmanager/doctest.yml?branch=main&label=docs%20%28main%29\n      :target: http://tomcatmanager.readthedocs.io/en/stable\n      :alt: main branch documentation status\n.. image:: https://img.shields.io/github/actions/workflow/status/tomcatmanager/tomcatmanager/doctest.yml?branch=main&label=docs%20%28develop%29\n      :target: https://tomcatmanager.readthedocs.io/en/develop/\n      :alt: develop branch documentation status\n\n\nIf you use Apache Tomcat for any sort of development work you\u2019ve probably deployed\nlots of applications to it. There are a several ways to get your war files deployed:\n\n- use the `Tomcat Manager <https://tomcat.apache.org/tomcat-9.0-doc/manager-howto.html>`_\n  application in your browser\n- use the `Tomcat Ant Tasks <https://cwiki.apache.org/confluence/display/tomcat/AntDeploy>`_ included with\n  Tomcat\n- use `Cargo <https://codehaus-cargo.github.io/>`_ and its plugins for ant and maven\n\nHere's another way: a command line tool and python library for managing a Tomcat server.\n\n\nHow Do I Use It?\n----------------\n\nThis package installs a command line utility called ``tomcat-manager``. It's\neasily scriptable using your favorite shell:\n\n.. code-block:: text\n\n   $ tomcat-manager --user=ace --password=newenglandclamchowder \\\n   http://localhost:8080/manager deploy local sample.war /sampleapp\n   $ echo $?\n   0\n\nThere is also an interactive mode:\n\n.. code-block:: text\n\n   $ tomcat-manager\n   tomcat-manager>connect http://localhost:8080/manager ace\n   Password:\n   --connected to http://localhost:8080/manager as ace\n   tomcat-manager>list\n   Path                     Status  Sessions Directory\n   ------------------------ ------- -------- ------------------------------------\n   /                        running        0 ROOT\n   /sampleapp               stopped        0 sampleapp##9\n   /sampleapp               running        0 sampleapp##8\n   /host-manager            running        0 /usr/share/tomcat8-admin/host-manage\n   /manager                 running        0 /usr/share/tomcat8-admin/manager\n\nAnd for the ultimate in flexibility, you can use the python package directly:\n\n.. code-block:: python\n\n   >>> import tomcatmanager as tm\n   >>> tomcat = tm.TomcatManager()\n   >>> r = tomcat.connect(url=\"http://localhost:8080/manager\",\n   ... user=\"ace\", password=\"newenglandclamchowder\")\n   >>> tomcat.is_connected\n   True\n   >>> r = tomcat.stop(\"/someapp\")\n   >>> r.ok\n   False\n   >>> r.status_message\n   'No context exists named /someapp'\n\n\nWhat Can It Do?\n---------------\n\nTomcatmanager has the following capabilities, all available from the command line,\ninteractive mode, and as a python library:\n\n- **deploy** - deploy a war file containing a tomcat application in the tomcat server\n- **redeploy** - remove the application currently installed at a given path and\n  install a new war file there\n- **undeploy** - remove an application from the tomcat server\n- **start** - start a tomcat application that has been deployed but isn't running\n- **stop** - stop a tomcat application and leave it deployed on the server\n- **reload** - stop and start a tomcat application\n- **sessions** - show active sessions for a particular tomcat application\n- **expire** - expire idle sessions\n- **list** - show all installed applications\n- **serverinfo** - show information about the server, including tomcat version, OS\n  version and architecture, and jvm version\n- **status** - show server status information in xml format\n- **vminfo** - show diagnostic information about the jvm\n- **threaddump** - show a jvm thread dump\n- **resources** - show the global jdni resources configured in tomcat\n- **findleakers** - show tomcat applications that leak memory\n- **sslconnectorciphers** - show tls ciphers configured for each connector\n- **sslconnectorcerts** - show tls certificate chain for each virtual host\n- **sslconnectortrustedcerts** - show trusted certificates for each virtual host\n- **sslreload** - reload tls certificate and key files\n\n\nDocumentation\n-------------\n\nComplete documentation for the last released version is available at\n`<http://tomcatmanager.readthedocs.io/en/stable/>`_. It includes material\nshowing how to use ``tomcat-manager`` from the command line or using\ninteractive mode. There is also a walkthrough of how to use the API and an\nAPI reference.\n\nDocumentation is also built from the `develop\n<https://github.com/tomcatmanager/tomcatmanager/tree/develop>`_ branch, and\npublished at `<https://tomcatmanager.readthedocs.io/en/latest/>`_. The develop\nbranch may not yet be released to PyPi, but you can see the documentation for what's\ncoming up in the next release.\n\n\nInstallation\n------------\n\nYou'll need Python >= 3.8. Install using pip:\n\n.. code-block:: text\n\n   $ pip install tomcatmanager\n\nWorks on Windows, macOS, and Linux.\n\nWorks with Tomcat >= 8.5 and <= 10.1.\n\n\nTomcat Configuration\n--------------------\n\nThis library and associated tools do their work via the Tomcat Manager\nweb application included in the Tomcat distribution. You will need to\nconfigure authentication in ``tomcat-users.xml`` with access to the\n``manager-script`` role:\n\n.. code-block:: xml\n\n   <tomcat-users>\n     ...\n     <role rolename=\"manager-script\"/>\n     <user username=\"ace\" password=\"newenglandclamchowder\" roles=\"manager-script\"/>\n     ...\n   </tomcat-users>\n\n",
    "bugtrack_url": null,
    "license": "Copyright (c) 2007 Jared Crapo  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.",
    "summary": "A command line tool and python library for managing a tomcat server.",
    "version": "7.0.1",
    "project_urls": {
        "documentation": "https://tomcatmanager.readthedocs.io",
        "homepage": "https://github.com/tomcatmanager/tomcatmanager",
        "repository": "https://github.com/tomcatmanager/tomcatmanager"
    },
    "split_keywords": [
        "java",
        "tomcat",
        "command line"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5e602c970ab672bc9122d8c1ab192efb08e4137d3ad09fb992ae9e6cc0192a74",
                "md5": "4935b0a3181aa4cf7adb83252947a333",
                "sha256": "1b06c7cf8c34f3b3220a0f7da4eb11467157aa4751f6344ab6cfefb98f21f69d"
            },
            "downloads": -1,
            "filename": "tomcatmanager-7.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4935b0a3181aa4cf7adb83252947a333",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 52749,
            "upload_time": "2023-12-03T04:42:26",
            "upload_time_iso_8601": "2023-12-03T04:42:26.366865Z",
            "url": "https://files.pythonhosted.org/packages/5e/60/2c970ab672bc9122d8c1ab192efb08e4137d3ad09fb992ae9e6cc0192a74/tomcatmanager-7.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1f65d93427def594263cc132ce7a8bcf4192fe020648319a4eab9f8dc61b34b7",
                "md5": "6410b5eda6bf598e4f9d3e5cf218ec6d",
                "sha256": "02f1b8e5dc1b10a94ffa0cef27373616d0fd41a3fe658d71481bdada8f3faa43"
            },
            "downloads": -1,
            "filename": "tomcatmanager-7.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "6410b5eda6bf598e4f9d3e5cf218ec6d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 134556,
            "upload_time": "2023-12-03T04:42:28",
            "upload_time_iso_8601": "2023-12-03T04:42:28.876390Z",
            "url": "https://files.pythonhosted.org/packages/1f/65/d93427def594263cc132ce7a8bcf4192fe020648319a4eab9f8dc61b34b7/tomcatmanager-7.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-03 04:42:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tomcatmanager",
    "github_project": "tomcatmanager",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "tomcatmanager"
}
        
Elapsed time: 0.49439s