{"id":24815,"library":"vsts","title":"VSTS Python Client (deprecated, use azure-devops)","description":"The `vsts` library was the original Python wrapper for Visual Studio Team Services (now Azure DevOps) APIs. As of version 0.1.25, it is deprecated and no longer maintained. Microsoft recommends migrating to the `azure-devops` library, which follows the Azure SDK guidelines and supports new API versions. The latest azure-devops release is 7.1.0b4.","status":"deprecated","version":"0.1.25","language":"python","source_language":"en","source_url":"https://github.com/Microsoft/vsts-python-api","tags":["azure-devops","vsts","deprecated","microsoft","api-wrapper"],"install":[{"cmd":"pip install vsts==0.1.25","lang":"bash","label":"old"}],"dependencies":[],"imports":[{"note":"Old import path is incorrect after refactoring.","wrong":"from vsts import VstsAuthentication","symbol":"VstsAuthentication","correct":"from vsts.vss_connection import VssConnection"},{"note":"Missing version subpackage.","wrong":"from vsts.work_item_tracking import WorkItemTrackingClient","symbol":"WorkItemTrackingClient","correct":"from vsts.work_item_tracking.v4_1.work_item_tracking_client import WorkItemTrackingClient"},{"note":"VssConnection is in the vss_connection submodule.","wrong":"from vsts import VssConnection","symbol":"VssConnection","correct":"from vsts.vss_connection import VssConnection"}],"quickstart":{"code":"from vsts.vss_connection import VssConnection\nfrom msrest.authentication import BasicAuthentication\n\npersonal_access_token = os.environ.get('AZURE_DEVOPS_PAT', '')\norganization_url = 'https://dev.azure.com/myorg'\ncredentials = BasicAuthentication('', personal_access_token)\nconnection = VssConnection(base_url=organization_url, creds=credentials)\nwit_client = connection.get_client('vsts.work_item_tracking.v4_1.work_item_tracking_client.WorkItemTrackingClient')\nprint(wit_client.get_work_item(1))","lang":"python","description":"Connect to Azure DevOps (formerly VSTS) using a PAT. Note: This library is deprecated; prefer 'azure-devops'."},"warnings":[{"fix":"Replace vsts with azure-devops. See https://github.com/microsoft/azure-devops-python-api","message":"The vsts library is deprecated and no longer maintained. Use azure-devops instead.","severity":"deprecated","affected_versions":"all"},{"fix":"Upgrade to azure-devops 7.1.0b4 or later which supports Python 3.12.","message":"vsts 0.1.25 is incompatible with Python 3.12 due to missing dependencies (e.g., 'collections' module removed).","severity":"breaking","affected_versions":"0.1.25"},{"fix":"Always include the full import path with version, e.g., from vsts.work_item_tracking.v4_1.work_item_tracking_client import WorkItemTrackingClient","message":"Import paths in vsts are deeply nested and version-specific (e.g., vsts.work_item_tracking.v4_1). Many online examples omit the version subpackage.","severity":"gotcha","affected_versions":"all"},{"fix":"Use: from msrest.authentication import BasicAuthentication; credentials = BasicAuthentication('', pat)","message":"Authentication requires 'msrest' library's BasicAuthentication. Using Personal Access Token requires empty username.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from vsts.vss_connection import VssConnection'","cause":"Incorrect import path (e.g., using 'from vsts import vss_connection' or wrong module name).","error":"ModuleNotFoundError: No module named 'vsts.vss_connection'"},{"fix":"Use 'from vsts.work_item_tracking.v4_1.work_item_tracking_client import WorkItemTrackingClient'","cause":"Missing version subpackage in import path.","error":"ImportError: cannot import name 'WorkItemTrackingClient' from 'vsts.work_item_tracking'"},{"fix":"Use: connection.get_client('vsts.work_item_tracking.v4_1.work_item_tracking_client.WorkItemTrackingClient')","cause":"Incorrect argument type for get_client; must be a string with full class path.","error":"AttributeError: 'VssConnection' object has no attribute 'get_client'"},{"fix":"Ensure PAT is valid and pass as: BasicAuthentication('', pat)","cause":"Invalid or missing Personal Access Token. Using wrong authentication class.","error":"msrest.exceptions.AuthenticationError: 'Bearer'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}