{"id":5900,"library":"dirac","title":"DIRAC Distributed Computing Framework","description":"DIRAC is an interware, a software framework for distributed computing, primarily used in scientific research for managing jobs, data, and resources across heterogeneous infrastructures like Grids and Clouds. As of version 9.1.6, it supports Python 3.11 and newer, with frequent patch releases addressing fixes and minor changes, and less frequent major updates introducing significant features and deployment considerations.","status":"active","version":"9.1.6","language":"en","source_language":"en","source_url":"https://github.com/DIRACGrid/DIRAC/","tags":["distributed-computing","grid","workflow-management","scientific-computing","framework"],"install":[{"cmd":"pip install dirac","lang":"bash","label":"Install DIRAC client"}],"dependencies":[{"reason":"DIRAC 9.x requires Python 3.11 or newer.","package":"Python","optional":false}],"imports":[{"note":"The main programmatic interface for client-side API interaction is typically accessed through `DIRAC.Interfaces.API.Dirac.Dirac`, not directly from a top-level `dirac` package.","wrong":"import dirac","symbol":"Dirac","correct":"from DIRAC.Interfaces.API.Dirac import Dirac"}],"quickstart":{"code":"from DIRAC.Interfaces.API.Dirac import Dirac\nimport os\n\ntry:\n    # Initialize the main DIRAC client interface\n    dirac_client = Dirac()\n\n    # Get the framework version (this is a local check and does not require a DIRAC server)\n    version = dirac_client.getFrameworkVersion()\n    print(f\"DIRAC client initialized successfully. Framework Version: {version}\")\n\n    # For operations that require connecting to a DIRAC server (e.g., job submission, status checks),\n    # you would typically need:\n    # 1. A valid X.509 VOMS proxy initialized (e.g., `voms-proxy-init`)\n    # 2. The DIRAC Configuration Server (CS) URL configured, usually via an environment variable\n    #    e.g., os.environ.get('DIRAC_CS_URL', 'https://example.com:8443/Configuration/Server')\n    # Without a running CS and proper authentication, remote calls will fail.\n\nexcept Exception as e:\n    print(f\"Error initializing DIRAC client or getting version: {e}\")\n    print(\"Ensure 'dirac' package is installed and Python >= 3.11 is used.\")","lang":"python","description":"This quickstart demonstrates how to import and initialize the main DIRAC programmatic client interface and retrieve the locally installed framework version. Note that full interaction with a DIRAC Grid requires a running DIRAC configuration server and proper authentication (e.g., an X.509 VOMS proxy) in your environment."},"warnings":[{"fix":"Refer to the release notes and official documentation for specific MySQL commands and Configuration Server adjustments during upgrade.","message":"Major database schema changes and Configuration Server updates are required for existing deployments upgrading to DIRAC 9.1.0 and 9.1.1. These changes include dropping and altering MySQL tables, and removing Configuration Server entries.","severity":"breaking","affected_versions":"9.1.0, 9.1.1"},{"fix":"Upgrade your Python environment to 3.11 or a newer compatible version.","message":"DIRAC 9.x requires Python 3.11 or newer. Attempting to install or run with older Python versions (e.g., Python 3.10 or earlier) will lead to dependency resolution failures or runtime errors.","severity":"breaking","affected_versions":"9.x and later"},{"fix":"Consult the official DIRAC installation and deployment documentation for detailed instructions on setting up a full DIRAC infrastructure.","message":"DIRAC is a comprehensive distributed computing *framework*, not just a Python library. `pip install dirac` only provides client-side functionality and core components. A full DIRAC deployment requires extensive setup, including services, databases (e.g., MySQL), web interfaces, and specific configuration, which is significantly more complex than simple package installation.","severity":"gotcha","affected_versions":"All"},{"fix":"Ensure you have a valid and unexpired VOMS proxy initialized in your environment before attempting to use DIRAC client tools that interact with remote services. The DIRAC_CS_URL environment variable might also be needed.","message":"Interacting with remote DIRAC services (e.g., submitting jobs, querying status) typically relies on X.509 VOMS proxies for user authentication and authorization. Expired or improperly initialized proxies (`voms-proxy-init`) are a frequent cause of 'permission denied' or authentication errors.","severity":"gotcha","affected_versions":"All"},{"fix":"Update scripts to use `--diracx-src-dir` instead of `--diracx-dist-dir`.","message":"In version 9.1.3, the CLI flag `--diracx-dist-dir` was replaced by `--diracx-src-dir` for certain deployment and CI-related scripts. Scripts or automation relying on the old flag will fail.","severity":"breaking","affected_versions":"9.1.3"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z"}