CVPySDK
=======
CVPySDK is a Python Package for Commvault Software.
CVPySDK uses REST APIs to perform CommCell operations.
Requirements
------------
- Python 3.9 and above
- `requests <https://pypi.python.org/pypi/requests/>`_ 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:
>>> pip 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/>`_
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": null,
"name": "cvpysdk",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "commvault, python, sdk, cv, simpana, commcell, cvlt, webconsole",
"author": null,
"author_email": "\"Commvault Systems Inc.\" <Dev-PythonSDK@commvault.com>",
"download_url": "https://files.pythonhosted.org/packages/cc/83/2e80927767374c5bd1d2f1f180fc00e806d412b3fefda8a3b1f096ad2ce7/cvpysdk-11.38.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.9 and above\n- `requests <https://pypi.python.org/pypi/requests/>`_ 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 >>> pip 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/>`_\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",
"bugtrack_url": null,
"license": null,
"summary": "Commvault SDK for Python",
"version": "11.38",
"project_urls": {
"Bug Tracker": "https://github.com/Commvault/cvpysdk/issues",
"Documentation": "https://commvault.github.io/cvpysdk/",
"Home": "https://github.com/Commvault/cvpysdk",
"Source": "https://github.com/Commvault/cvpysdk"
},
"split_keywords": [
"commvault",
" python",
" sdk",
" cv",
" simpana",
" commcell",
" cvlt",
" webconsole"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6309b35707bad04795574935b27c4362ba6e5b2f17e49b7d19dad2ff35b75914",
"md5": "ea2681869bb30802583f356c26cc6307",
"sha256": "a30117db7125c8142c39f1058ed1279051e38bb3c6d5b6b0d6bf46079649ad37"
},
"downloads": -1,
"filename": "cvpysdk-11.38-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ea2681869bb30802583f356c26cc6307",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 1251746,
"upload_time": "2024-12-16T10:49:23",
"upload_time_iso_8601": "2024-12-16T10:49:23.283168Z",
"url": "https://files.pythonhosted.org/packages/63/09/b35707bad04795574935b27c4362ba6e5b2f17e49b7d19dad2ff35b75914/cvpysdk-11.38-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cc832e80927767374c5bd1d2f1f180fc00e806d412b3fefda8a3b1f096ad2ce7",
"md5": "174270d2af74ab780fc9a2f54239ae4d",
"sha256": "33042f291d070636cced8669ea93d04dff6d63148890b2167969d1f015ad7bd4"
},
"downloads": -1,
"filename": "cvpysdk-11.38.tar.gz",
"has_sig": false,
"md5_digest": "174270d2af74ab780fc9a2f54239ae4d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 995458,
"upload_time": "2024-12-16T10:49:26",
"upload_time_iso_8601": "2024-12-16T10:49:26.364187Z",
"url": "https://files.pythonhosted.org/packages/cc/83/2e80927767374c5bd1d2f1f180fc00e806d412b3fefda8a3b1f096ad2ce7/cvpysdk-11.38.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-16 10:49:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Commvault",
"github_project": "cvpysdk",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "cvpysdk"
}