cvpysdk


Namecvpysdk JSON
Version 11.32.6 PyPI version JSON
download
home_pagehttps://github.com/Commvault/cvpysdk
SummaryCommvault SDK for Python
upload_time2023-10-23 06:32:15
maintainer
docs_urlNone
authorCommvault Systems Inc.
requires_python
licenseApache 2.0
keywords commvault python sdk cv simpana commcell cvlt webconsole
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            CVPySDK
=======

CVPySDK is a Python Package for Commvault Software.

CVPySDK uses REST APIs to perform CommCell operations.


Requirements
------------

- Python 3 and above
- `requests <https://pypi.python.org/pypi/requests/>`_ Python package
- `future <https://pypi.python.org/pypi/future>`_ Python package
- `xmltodict <https://pypi.python.org/pypi/xmltodict>`_ Python package
- Commvault Software v11 SP7 or later release with WebConsole installed


Installing CVPySDK
------------------

CVPySDK can be installed directly from PyPI using pip:

    >>> pip install cvpysdk


CVPySDK is available on GitHub `here <https://github.com/Commvault/cvpysdk>`__

It can also be installed from source.

After downloading, from within the ``cvpysdk`` directory, execute:

    >>> python setup.py install


Using CVPySDK
-------------

Login to Commcell:
    >>> from cvpysdk.commcell import Commcell
    >>> commcell = Commcell(webconsole_hostname, commcell_username, commcell_password)

Print all clients:
    >>> print(commcell.clients)

Get a client:
	>>> client = commcell.clients.get(client_name)

Get an agent:
	>>> agent = client.agents.get(agent_name)

Get an instance:
	>>> instance = agent.instances.get(instance_name)

Browsing content at instance level:
	>>> paths, dictionary = instance.browse(path='c:\\', show_deleted=True)

Browsing content of a instance in a specific time range:
	>>> paths, dictionary = instance.browse(path='f:\\', from_time='2010-04-19 02:30:00', to_time='2014-12-20 12:00:00')

Searching a file in instance backup content:
	>>> paths, dictionary = instance.find(file_name="*.csv")

Get a backupset:
	>>> backupset = instance.backupsets.get(backupset_name)

Run backup for a backupset:
	>>> job = backupset.backup()

Browsing content at backupset level:
	>>> paths, dictionary = backupset.browse(path='c:\\', show_deleted=True)

Browsing content of a backupset in a specific time range:
	>>> paths, dictionary = backupset.browse(path='f:\\', from_time='2010-04-19 02:30:00', to_time='2014-12-20 12:00:00')

Searching a file in backupset backup content:
	>>> paths, dictionary = backupset.find(file_name="*.csv")

Get a subclient:
	>>> subclient = backupset.subclients.get(subclient_name)

Run backup for a subclient:
	>>> job = subclient.backup(backup_level, incremental_backup, incremental_level)

Browsing content at subclient level:
	>>> paths, dictionary = subclient.browse(path='c:\\', show_deleted=True)

Browsing content of a subclient in a specific time range:
	>>> paths, dictionary = subclient.browse(path='f:\\', from_time='2010-04-19 02:30:00', to_time='2014-12-20 12:00:00')

Searching a file in subclient backup content:
	>>> paths, dictionary = subclient.find(file_name="*.txt")

Run restore in place job for a subclient:
	>>> job = subclient.restore_in_place(paths, overwrite, restore_data_and_acl)

Run restore out of place job for a subclient:
	>>> job = subclient.restore_out_of_place(client, destination_path, paths, overwrite, restore_data_and_acl)

Job Operations:
	>>> job.pause()		    # Suspends the Job
	>>> job.resume()	    # Resumes the Job
	>>> job.kill()		    # Kills the Job
	>>> job.status		    # Current Status the Job  --  Completed / Pending / Failed / .... / etc.
	>>> job.is_finished	    # Job finished or not     --  True / False
	>>> job.delay_reason	    # Job delay reason (if any)
	>>> job.pending_reason	    # Job pending reason (if any)


Uninstalling
------------

On Windows, if CVPySDK was installed using an ``.exe`` or ``.msi``
installer, simply use the uninstall feature of "**Add/Remove Programs**" in the
Control Panel.

Alternatively, you can uninstall using the **pip** command:

    >>> pip uninstall cvpysdk


Subclient Support
-----------------

Subclient operations are currently supported for the following Agents:

#. File System

#. Virtual Server

#. Cloud Apps

#. SQL Server

#. NAS / NDMP

#. SAP HANA

#. ORACLE

#. Sybase

#. SAP ORACLE

#. Exchange Database

#. Exchange Mailbox

#. Informix

#. Notes Database

#. MySQL

#. PostgreS

#. Big Data Apps


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

To get started, please see the `full documentation for this library <https://commvault.github.io/cvpysdk/cvpysdk/index.html>`_


Contribution Guidelines
-----------------------

#. We welcome all the enhancements from everyone although we request the developer to follow some guidelines while interacting with the ``CVPySDK`` codebase.

#. Before adding any enhancements/bug-fixes, we request you to open an Issue first.

#. The SDK team will go over the Issue and notify if it is required or already been worked on.

#. If the Issue is approved, the contributor can then make the changes to their fork and open a pull request.

Pull Requests
*************
- CVPySDK has 2 active branches, namely:
    - **master**
    - **dev**

- The contributor should *Fork* the **dev** branch, and make their changes on top of it, and open a *Pull Request*
- The **master** branch will then be updated with the **dev** branch, once everything is verified

 **Note:** The SDK team will not accept any *Pull Requests* on the **master** branch

Coding Considerations
*********************

- All python code should be **PEP8** compliant.
- All changes should be consistent with the design of the SDK.
- The code should be formatted using **autopep8** with line-length set to **99** instead of default **79**.
- All changes and any new methods/classes should be properly documented.
- The doc strings should be of the same format as existing docs.

Questions/Comments/Suggestions
------------------------------
If you have any questions or comments, please contact us `here <https://ma.commvault.com/>`__.
Also Check out our community for `Automation <https://community.commvault.com/developer-tools-integration-and-automation-workflow-rest-powershell-etc-50>`_ incase of queries.

Code of Conduct
***************

Everyone interacting in the **CVPySDK** project's codebases, issue trackers,
chat rooms, and mailing lists is expected to follow the
`PyPA Code of Conduct`_.

.. _PyPA Code of Conduct: https://www.pypa.io/en/latest/code-of-conduct/


License
-------
**CVPySDK** and its contents are licensed under `Commvault License <https://raw.githubusercontent.com/Commvault/cvpysdk/master/LICENSE.txt>`_


About Commvault
---------------
.. image:: https://commvault.github.io/cvpysdk/logo.png
    :align: center

|

`Commvault <https://www.commvault.com/>`_
(NASDAQ: CVLT) is a publicly traded data protection and information management software company headquartered in Tinton Falls, New Jersey.

It was formed in 1988 as a development group in Bell Labs, and later became a business unit of AT&T Network Systems. It was incorporated in 1996.

Commvault software assists organizations with data backup and recovery, cloud and infrastructure management, and retention and compliance.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Commvault/cvpysdk",
    "name": "cvpysdk",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "commvault,python,sdk,cv,simpana,commcell,cvlt,webconsole",
    "author": "Commvault Systems Inc.",
    "author_email": "Dev-PythonSDK@commvault.com",
    "download_url": "https://files.pythonhosted.org/packages/77/df/29949bdf33c1d4c80b35121006ea2ccf9a36f2d8137d7c405264b9dcfef7/cvpysdk-11.32.6.tar.gz",
    "platform": null,
    "description": "CVPySDK\n=======\n\nCVPySDK is a Python Package for Commvault Software.\n\nCVPySDK uses REST APIs to perform CommCell operations.\n\n\nRequirements\n------------\n\n- Python 3 and above\n- `requests <https://pypi.python.org/pypi/requests/>`_ Python package\n- `future <https://pypi.python.org/pypi/future>`_ Python package\n- `xmltodict <https://pypi.python.org/pypi/xmltodict>`_ Python package\n- Commvault Software v11 SP7 or later release with WebConsole installed\n\n\nInstalling CVPySDK\n------------------\n\nCVPySDK can be installed directly from PyPI using pip:\n\n    >>> pip install cvpysdk\n\n\nCVPySDK is available on GitHub `here <https://github.com/Commvault/cvpysdk>`__\n\nIt can also be installed from source.\n\nAfter downloading, from within the ``cvpysdk`` directory, execute:\n\n    >>> python setup.py install\n\n\nUsing CVPySDK\n-------------\n\nLogin to Commcell:\n    >>> from cvpysdk.commcell import Commcell\n    >>> commcell = Commcell(webconsole_hostname, commcell_username, commcell_password)\n\nPrint all clients:\n    >>> print(commcell.clients)\n\nGet a client:\n\t>>> client = commcell.clients.get(client_name)\n\nGet an agent:\n\t>>> agent = client.agents.get(agent_name)\n\nGet an instance:\n\t>>> instance = agent.instances.get(instance_name)\n\nBrowsing content at instance level:\n\t>>> paths, dictionary = instance.browse(path='c:\\\\', show_deleted=True)\n\nBrowsing content of a instance in a specific time range:\n\t>>> paths, dictionary = instance.browse(path='f:\\\\', from_time='2010-04-19 02:30:00', to_time='2014-12-20 12:00:00')\n\nSearching a file in instance backup content:\n\t>>> paths, dictionary = instance.find(file_name=\"*.csv\")\n\nGet a backupset:\n\t>>> backupset = instance.backupsets.get(backupset_name)\n\nRun backup for a backupset:\n\t>>> job = backupset.backup()\n\nBrowsing content at backupset level:\n\t>>> paths, dictionary = backupset.browse(path='c:\\\\', show_deleted=True)\n\nBrowsing content of a backupset in a specific time range:\n\t>>> paths, dictionary = backupset.browse(path='f:\\\\', from_time='2010-04-19 02:30:00', to_time='2014-12-20 12:00:00')\n\nSearching a file in backupset backup content:\n\t>>> paths, dictionary = backupset.find(file_name=\"*.csv\")\n\nGet a subclient:\n\t>>> subclient = backupset.subclients.get(subclient_name)\n\nRun backup for a subclient:\n\t>>> job = subclient.backup(backup_level, incremental_backup, incremental_level)\n\nBrowsing content at subclient level:\n\t>>> paths, dictionary = subclient.browse(path='c:\\\\', show_deleted=True)\n\nBrowsing content of a subclient in a specific time range:\n\t>>> paths, dictionary = subclient.browse(path='f:\\\\', from_time='2010-04-19 02:30:00', to_time='2014-12-20 12:00:00')\n\nSearching a file in subclient backup content:\n\t>>> paths, dictionary = subclient.find(file_name=\"*.txt\")\n\nRun restore in place job for a subclient:\n\t>>> job = subclient.restore_in_place(paths, overwrite, restore_data_and_acl)\n\nRun restore out of place job for a subclient:\n\t>>> job = subclient.restore_out_of_place(client, destination_path, paths, overwrite, restore_data_and_acl)\n\nJob Operations:\n\t>>> job.pause()\t\t    # Suspends the Job\n\t>>> job.resume()\t    # Resumes the Job\n\t>>> job.kill()\t\t    # Kills the Job\n\t>>> job.status\t\t    # Current Status the Job  --  Completed / Pending / Failed / .... / etc.\n\t>>> job.is_finished\t    # Job finished or not     --  True / False\n\t>>> job.delay_reason\t    # Job delay reason (if any)\n\t>>> job.pending_reason\t    # Job pending reason (if any)\n\n\nUninstalling\n------------\n\nOn Windows, if CVPySDK was installed using an ``.exe`` or ``.msi``\ninstaller, simply use the uninstall feature of \"**Add/Remove Programs**\" in the\nControl Panel.\n\nAlternatively, you can uninstall using the **pip** command:\n\n    >>> pip uninstall cvpysdk\n\n\nSubclient Support\n-----------------\n\nSubclient operations are currently supported for the following Agents:\n\n#. File System\n\n#. Virtual Server\n\n#. Cloud Apps\n\n#. SQL Server\n\n#. NAS / NDMP\n\n#. SAP HANA\n\n#. ORACLE\n\n#. Sybase\n\n#. SAP ORACLE\n\n#. Exchange Database\n\n#. Exchange Mailbox\n\n#. Informix\n\n#. Notes Database\n\n#. MySQL\n\n#. PostgreS\n\n#. Big Data Apps\n\n\nDocumentation\n-------------\n\nTo get started, please see the `full documentation for this library <https://commvault.github.io/cvpysdk/cvpysdk/index.html>`_\n\n\nContribution Guidelines\n-----------------------\n\n#. We welcome all the enhancements from everyone although we request the developer to follow some guidelines while interacting with the ``CVPySDK`` codebase.\n\n#. Before adding any enhancements/bug-fixes, we request you to open an Issue first.\n\n#. The SDK team will go over the Issue and notify if it is required or already been worked on.\n\n#. If the Issue is approved, the contributor can then make the changes to their fork and open a pull request.\n\nPull Requests\n*************\n- CVPySDK has 2 active branches, namely:\n    - **master**\n    - **dev**\n\n- The contributor should *Fork* the **dev** branch, and make their changes on top of it, and open a *Pull Request*\n- The **master** branch will then be updated with the **dev** branch, once everything is verified\n\n **Note:** The SDK team will not accept any *Pull Requests* on the **master** branch\n\nCoding Considerations\n*********************\n\n- All python code should be **PEP8** compliant.\n- All changes should be consistent with the design of the SDK.\n- The code should be formatted using **autopep8** with line-length set to **99** instead of default **79**.\n- All changes and any new methods/classes should be properly documented.\n- The doc strings should be of the same format as existing docs.\n\nQuestions/Comments/Suggestions\n------------------------------\nIf you have any questions or comments, please contact us `here <https://ma.commvault.com/>`__.\nAlso Check out our community for `Automation <https://community.commvault.com/developer-tools-integration-and-automation-workflow-rest-powershell-etc-50>`_ incase of queries.\n\nCode of Conduct\n***************\n\nEveryone interacting in the **CVPySDK** project's codebases, issue trackers,\nchat rooms, and mailing lists is expected to follow the\n`PyPA Code of Conduct`_.\n\n.. _PyPA Code of Conduct: https://www.pypa.io/en/latest/code-of-conduct/\n\n\nLicense\n-------\n**CVPySDK** and its contents are licensed under `Commvault License <https://raw.githubusercontent.com/Commvault/cvpysdk/master/LICENSE.txt>`_\n\n\nAbout Commvault\n---------------\n.. image:: https://commvault.github.io/cvpysdk/logo.png\n    :align: center\n\n|\n\n`Commvault <https://www.commvault.com/>`_\n(NASDAQ: CVLT) is a publicly traded data protection and information management software company headquartered in Tinton Falls, New Jersey.\n\nIt was formed in 1988 as a development group in Bell Labs, and later became a business unit of AT&T Network Systems. It was incorporated in 1996.\n\nCommvault software assists organizations with data backup and recovery, cloud and infrastructure management, and retention and compliance.\n\n\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Commvault SDK for Python",
    "version": "11.32.6",
    "project_urls": {
        "Bug Tracker": "https://github.com/Commvault/cvpysdk/issues",
        "Documentation": "https://commvault.github.io/cvpysdk/",
        "Homepage": "https://github.com/Commvault/cvpysdk",
        "Source Code": "https://github.com/Commvault/cvpysdk/tree/master"
    },
    "split_keywords": [
        "commvault",
        "python",
        "sdk",
        "cv",
        "simpana",
        "commcell",
        "cvlt",
        "webconsole"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aeea314b3976ba25cf2a38bb3d1958752ef7b8c1e446ffa310b67d02b0d807c4",
                "md5": "41f471a28eeba03f882133089f38343c",
                "sha256": "4d988606e2b7ca31c1e77f73a3c39db98fb5f2e45022c044d84e0ab475ba0af9"
            },
            "downloads": -1,
            "filename": "cvpysdk-11.32.6-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "41f471a28eeba03f882133089f38343c",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 1105255,
            "upload_time": "2023-10-23T06:32:12",
            "upload_time_iso_8601": "2023-10-23T06:32:12.215499Z",
            "url": "https://files.pythonhosted.org/packages/ae/ea/314b3976ba25cf2a38bb3d1958752ef7b8c1e446ffa310b67d02b0d807c4/cvpysdk-11.32.6-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "77df29949bdf33c1d4c80b35121006ea2ccf9a36f2d8137d7c405264b9dcfef7",
                "md5": "ce5fbf928479fcb2c8207575afb36211",
                "sha256": "37be50ef8dcf53910e04372e3835b261736dff2f71d94297a9779d28f15a3a47"
            },
            "downloads": -1,
            "filename": "cvpysdk-11.32.6.tar.gz",
            "has_sig": false,
            "md5_digest": "ce5fbf928479fcb2c8207575afb36211",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 871435,
            "upload_time": "2023-10-23T06:32:15",
            "upload_time_iso_8601": "2023-10-23T06:32:15.124768Z",
            "url": "https://files.pythonhosted.org/packages/77/df/29949bdf33c1d4c80b35121006ea2ccf9a36f2d8137d7c405264b9dcfef7/cvpysdk-11.32.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-23 06:32:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Commvault",
    "github_project": "cvpysdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "cvpysdk"
}
        
Elapsed time: 0.13569s