{"id":638,"library":"google-cloud-orchestration-airflow","title":"Google Cloud Orchestration Airflow API Client Library","description":"Cloud Composer is a fully managed Apache Airflow service that simplifies the creation, scheduling, monitoring, and management of workflows. This client library provides programmatic access to the Google Cloud Orchestration Airflow API, allowing Python developers to interact with Cloud Composer environments and their underlying Airflow instances. The current version is 1.20.0, and Google Cloud client libraries typically follow a continuous release cadence with frequent updates for new features, bug fixes, and API changes.","status":"active","version":"1.20.0","language":"python","source_language":"en","source_url":"https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-orchestration-airflow","tags":["google cloud","airflow","composer","orchestration","workflow"],"install":[{"cmd":"pip install google-cloud-orchestration-airflow","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Requires Python 3.9 or higher for the current version. Python <= 3.6 is explicitly unsupported.","package":"Python","optional":false}],"imports":[{"wrong":"from google.cloud.orchestration.airflow.service.v1 import EnvironmentsClient","symbol":"EnvironmentsClient","correct":"from google.cloud.orchestration.airflow.service import EnvironmentsClient"}],"quickstart":{"code":"import os\nfrom google.cloud.orchestration.airflow.service.v1 import EnvironmentsClient\nfrom google.cloud.orchestration.airflow.service.v1 import types\n\ndef list_composer_environments(project_id: str, location: str):\n    \"\"\"Lists Cloud Composer environments in a given project and location.\"\"\"\n    client = EnvironmentsClient()\n    parent = f\"projects/{project_id}/locations/{location}\"\n\n    try:\n        request = types.ListEnvironmentsRequest(parent=parent)\n        page_result = client.list_environments(request=request)\n\n        print(f\"Cloud Composer Environments in {location}:\")\n        found_any = False\n        for environment in page_result:\n            print(f\"  - {environment.name} (State: {environment.state.name})\")\n            found_any = True\n        if not found_any:\n            print(\"  No environments found.\")\n\n    except Exception as e:\n        print(f\"Error listing environments: {e}\")\n\nif __name__ == \"__main__\":\n    project_id = os.environ.get('GOOGLE_CLOUD_PROJECT', 'your-gcp-project-id')\n    location = os.environ.get('GOOGLE_CLOUD_LOCATION', 'us-central1') # e.g., 'us-central1', 'europe-west1'\n\n    if project_id == 'your-gcp-project-id':\n        print(\"Please set the GOOGLE_CLOUD_PROJECT environment variable or replace 'your-gcp-project-id'.\")\n    elif location == 'us-central1':\n        print(\"Please set the GOOGLE_CLOUD_LOCATION environment variable or choose your desired location.\")\n    else:\n        list_composer_environments(project_id, location)\n","lang":"python","description":"This quickstart code initializes the `EnvironmentsClient` and attempts to list all Cloud Composer environments within a specified Google Cloud project and location. Authentication is handled implicitly by the Google Cloud client libraries, typically through environment variables (e.g., `GOOGLE_APPLICATION_CREDENTIALS`) or the default service account if running on GCP. Users should replace `your-gcp-project-id` and specify a `location` (e.g., 'us-central1', 'europe-west1') where their Composer environments might reside."},"warnings":[{"fix":"Review the Cloud Composer and Airflow release notes for breaking changes before upgrading. Test DAGs thoroughly in a staging environment.","message":"When upgrading Cloud Composer or Airflow versions, ensure your existing DAGs and any custom PyPI packages are compatible. Incompatible changes can cause DAGs to fail. It's crucial to check the changelogs for the new Airflow version and associated provider packages.","severity":"breaking","affected_versions":"All versions (during environment upgrades)"},{"fix":"Configure logging handlers and formatters for Python's `logging` module. Consider setting the `GOOGLE_SDK_PYTHON_LOGGING_SCOPE` environment variable for basic structured logging. Restrict access to logs containing sensitive data.","message":"The library's logging events are not handled by default and may contain sensitive information. Users must explicitly configure Python's standard logging functionality to capture and handle these events.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Consult the changelog for `apache-airflow-providers-google` to identify replacements for deprecated operators and hooks. Migrate to the recommended alternatives, such as `Google Cloud Batch operators` or specific Vertex AI operators.","message":"The `apache-airflow-providers-google` package, which is heavily used by Cloud Composer users, has undergone several breaking changes, including the removal or renaming of various operators and hooks (e.g., `LifeSciencesRunPipelineOperator`, `BigQueryCreateEmptyTableOperator`).","severity":"breaking","affected_versions":"apache-airflow-providers-google >= 6.0.0 (and subsequent versions)"},{"fix":"Upgrade your Python environment to Python 3.9 or higher. Google Cloud client libraries are compatible with all active and maintenance versions of Python.","message":"Python versions 3.6 and below are no longer supported. Using an unsupported Python version can lead to installation failures, runtime errors, and security vulnerabilities.","severity":"deprecated","affected_versions":"<= 3.6"},{"fix":"Correct the import statement to `from google.cloud.orchestration.airflow.service_v1 import EnvironmentsClient`. Ensure the `google-cloud-orchestration-airflow` package is installed in your environment (`pip install google-cloud-orchestration-airflow`).","message":"Attempting to import `EnvironmentsClient` from `google.cloud.orchestration.airflow.service.v1` resulted in a `ModuleNotFoundError`. The correct module path for the Google Cloud Composer service client is typically `google.cloud.orchestration.airflow.service_v1` (using an underscore instead of a dot for the version part). This error also occurs if the `google-cloud-orchestration-airflow` client library is not installed.","severity":"breaking","affected_versions":"All versions (if using incorrect import path or missing `google-cloud-orchestration-airflow`)"},{"fix":"Ensure the `google-cloud-orchestration-airflow` Python package is installed in your environment using `pip install google-cloud-orchestration-airflow`. If running in a Cloud Composer environment, ensure the package is specified in the environment's PyPI packages list.","message":"The `ModuleNotFoundError: No module named 'google.cloud.orchestration.airflow.service.v1'` indicates that the Google Cloud Composer service client library is not installed or accessible in your Python environment. This library is required to interact with the Cloud Composer API.","severity":"breaking","affected_versions":"All versions (when the library is not installed)"}],"env_vars":null,"search_vec":"'1.20.0':58 'access':32 'airflow':4,15,38,52,83 'allow':40 'apach':14 'api':5,39,79 'bug':76 'cadenc':69 'chang':80 'client':6,28,62 'cloud':2,8,36,46,61,82 'compos':9,47,84 'continu':67 'creation':20 'current':55 'develop':42 'environ':48 'featur':75 'fix':77 'follow':65 'frequent':71 'fulli':12 'googl':1,35,60,81 'instanc':53 'interact':44 'librari':7,29,63 'manag':13,24 'monitor':22 'new':74 'orchestr':3,37,85 'programmat':31 'provid':30 'python':41 'releas':68 'schedul':21 'servic':16 'simplifi':18 'typic':64 'under':51 'updat':72 'version':56 'workflow':26,86","created_at":"2026-03-28T17:08:20.878308+00:00","updated_at":"2026-04-16T15:22:51.798811+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":0,"quickstart_score":0,"quickstart_tag":"stale","pypi_latest":"1.21.0","cli_name":"","cli_version":null,"type":"library","homepage":"https://cloud.google.com/composer","github":"https://github.com/googleapis/google-cloud-python","docs":null,"changelog":null,"pypi":"https://pypi.org/project/google-cloud-orchestration-airflow/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["gcp","data","workflow","aws"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-30","last_verified":"2026-06-30","next_check":"2026-07-30","install_tag":"stale"}}