{"id":23519,"library":"dbs3-pycurl","title":"dbs3-pycurl","description":"DBS3 Pycurl Client is a Python library providing a pycurl-based HTTP client for interacting with the CMS Data Bookkeeping Service (DBS). Version 3.18.3 is currently available, with last release in 2023-2024, and it follows the DBS3 release schedule.","status":"active","version":"3.18.3","language":"python","source_language":"en","source_url":"https://github.com/dmwm/PycurlClient/tree/3.17.8","tags":["cms","dbs","pycurl","http-client","data-management"],"install":[{"cmd":"pip install dbs3-pycurl","lang":"bash","label":"Default install"}],"dependencies":[{"reason":"Required for HTTP client functionality","package":"pycurl","optional":false},{"reason":"Required for Oracle database access","package":"cx-Oracle","optional":true}],"imports":[{"note":"Common mistake: trying to import DBSClient directly from dbs or dbs3","wrong":"","symbol":"DBSClient","correct":"from dbs.apis.dbsClient import DBSClient"},{"note":"DBSReader is used for read-only access","wrong":"","symbol":"DBSReader","correct":"from dbs.apis.dbsClient import DBSReader"},{"note":"Utility class for database info","wrong":"","symbol":"DbInfo","correct":"from dbs.utils.dbinfo import DbInfo"}],"quickstart":{"code":"from dbs.apis.dbsClient import DBSReader\nimport os\n\n# Example: fetch dataset summary by dataset\nreader = DBSReader(url=\"https://cmsweb.cern.ch/dbs/prod/global/DBSReader\")\ndataset = \"/Sample/Sample-4342-0003/GEN-SIM\"\nsummary = reader.listDatasetSummary(dataset=dataset)\nprint(summary)","lang":"python","description":"Initialize DBSReader with production URL and fetch dataset summary."},"warnings":[{"fix":"Create a new client instance per thread or use threading locks.","message":"The DBSClient and DBSReader classes are not thread-safe. Do not share instances across threads without locks.","severity":"gotcha","affected_versions":"all"},{"fix":"Monitor release notes for deprecation timelines and migrate to REST.","message":"The 'dbs.apis.dbsClient' API is gradually being replaced by REST-based clients. Check for 'DBS3Client' or direct REST calls in newer releases.","severity":"deprecated","affected_versions":">=3.18.0"},{"fix":"Install pycurl with SSL support, e.g., 'PYCURL_SSL_LIBRARY=openssl pip install pycurl'.","message":"The library uses pycurl under the hood; ensure that the system has libcurl installed and pycurl is compiled with SSL support to avoid connection errors.","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":"Run 'pip install dbs3-pycurl' and ensure it is in the same Python environment.","cause":"The package dbs3-pycurl is not installed or installed in a different environment.","error":"ImportError: No module named dbs.apis.dbsClient"},{"fix":"Check the URL for typos and ensure network connectivity (e.g., VPN or CERN proxy).","cause":"Network issue or incorrect DBS server URL.","error":"pycurl.error: (7, 'Failed to connect to address')"},{"fix":"Verify the dataset name format (e.g., /primary/proc/datatype). Use listDatasets to check availability.","cause":"The dataset name or path is malformed or does not exist.","error":"dbs.exceptions.DBSException: Invalid input parameter"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}