{"id":23480415,"url":"https://github.com/fluid-cloudnative/fluid-client-python","last_synced_at":"2025-10-16T03:02:23.600Z","repository":{"id":43103694,"uuid":"368070336","full_name":"fluid-cloudnative/fluid-client-python","owner":"fluid-cloudnative","description":"Fluid Python Client","archived":false,"fork":false,"pushed_at":"2025-01-20T03:44:55.000Z","size":662,"stargazers_count":2,"open_issues_count":3,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-28T11:01:31.268Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fluid-cloudnative.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-17T05:51:03.000Z","updated_at":"2024-11-08T06:20:28.000Z","dependencies_parsed_at":"2023-12-04T03:25:29.055Z","dependency_job_id":"ca39d309-2679-49c5-8452-18b5b020a763","html_url":"https://github.com/fluid-cloudnative/fluid-client-python","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluid-cloudnative%2Ffluid-client-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluid-cloudnative%2Ffluid-client-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluid-cloudnative%2Ffluid-client-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluid-cloudnative%2Ffluid-client-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fluid-cloudnative","download_url":"https://codeload.github.com/fluid-cloudnative/fluid-client-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248894939,"owners_count":21179152,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-24T20:12:58.914Z","updated_at":"2025-10-16T03:02:18.582Z","avatar_url":"https://github.com/fluid-cloudnative.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fluid Python SDK\nFluid SDK in Python\n\nThis Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:\n\n## Requirements.\n- Python \u003e= 3.7\n\n## Installation \u0026 Usage\n### pip install\n\n```sh\npip install fluid-pysdk\n```\n(you may need to run `pip` with root permission: `sudo pip install fluid-pysdk`)\n\n## Getting Started\n\nFluid Python SDK provides two types of \"client SDK\" for users with different expertises and preference.\n- `fluid.FluidClient` (the recommended one) provides a more Pythonic interface with polished user experience.\n- `fluid.FluidK8sClient` provides a low-level YAML-style interface for those who have rich experience in Kubernetes.\n\nThe following shows the same code example using two types of client SDK. The example simply creates a dataset and get its status.\n\n### with `fluid.FluidClient`\n\n```python\nimport logging\nimport sys\n\nfrom fluid import FluidClient, ClientConfig\n\nlogger = logging.getLogger(\"fluidsdk\")\nstream_handler = logging.StreamHandler(sys.stdout)\nstream_handler.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s'))\nlogger.addHandler(stream_handler)\nlogger.setLevel(logging.INFO)\n\ndef main():\n    name = \"demo\"\n    namespace = \"default\"\n    \n    client_config = ClientConfig(namespace=namespace)\n    fluid_client = FluidClient(client_config)\n    \n    \n    try:\n        fluid_client.create_dataset(name, \"hbase\", \"https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/stable/\", \"/\")\n    except Exception as e:\n       raise RuntimeError(f\"Failed to create dataset: {e}\") \n    \n    logger.info(f\"Dataset \\\"{namespace}/{name}\\\" created successfully\")\n    \n    try:\n        dataset = fluid_client.get_dataset(name, namespace)\n    except Exception as e:\n        raise RuntimeError(f\"Error when getting dataset \\\"{namespace}/{name}\\\": {e}\")\n    else:\n        logger.info(f\"Dataset \\\"{namespace}/{name}\\\"'s phase is: {dataset.report_status(status_type='binding_status')['phase']}\")\n\nif __name__ == '__main__':\n    main()\n```\n\n### with `fluid.FluidK8sClient`\n\n```python\nimport logging\nimport sys\n\nfrom kubernetes import client\n\nfrom fluid import FluidK8sClient\nfrom fluid import constants\nfrom fluid import models\n\nlogger = logging.getLogger(\"fluidsdk\")\nstream_handler = logging.StreamHandler(sys.stdout)\nstream_handler.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s'))\nlogger.addHandler(stream_handler)\nlogger.setLevel(logging.INFO)\n\n\n# Output detailed debug message for fluidsdk\n# logger.setLevel(logging.DEBUG)\n\ndef main():\n    fluid_client = FluidK8sClient()\n\n    name = \"demo\"\n    namespace = \"default\"\n\n    dataset = models.Dataset(\n        api_version=constants.API_VERSION,\n        kind=constants.DATASET_KIND,\n        metadata=client.V1ObjectMeta(\n            name=name,\n            namespace=namespace\n        ),\n        spec=models.DatasetSpec(\n            mounts=[\n                models.Mount(\n                    mount_point=\"https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/stable/\",\n                    name=\"hbase\",\n                    path=\"/\",\n                )\n            ]\n        )\n    )\n\n    try:\n        fluid_client.create_dataset(dataset)\n    except Exception as e:\n        raise RuntimeError(f\"Failed to create dataset: {e}\")\n\n    logger.info(f\"Dataset \\\"{dataset.metadata.namespace}/{dataset.metadata.name}\\\" created successfully\")\n\n    try:\n        dataset = fluid_client.get_dataset(name, namespace)\n    except Exception as e:\n        raise RuntimeError(f\"Error when getting dataset \\\"{namespace}/{name}\\\": {e}\")\n\n    assert type(dataset) == models.Dataset\n    logger.info(f\"Dataset \\\"{namespace}/{name}\\\"'s phase is: {dataset.status.phase}\")\n\n\nif __name__ == '__main__':\n    main()\n```\n\n## Versioning\n\nFluid Python SDK's version **ALWAYS** follows the Fluid's version as long as they share the fully compatible APIs. For example, if a released version of Fluid is v1.0.1, Fluid Python SDK with version prefix \"v1.0.1\" is guaranteed to have \nsame APIs as the released Fluid version. \n\nFluid Python SDK may have \"post\" version that updates the inner code but keep the APIs untouched (e.g. hotfixes). For example, \"v1.0.1.post1\" is a post version of \"v1.0.1\" which includes the latest\nchanges.\n\n\n## Documentation For Models\n\n - [APIGatewayStatus](docs/APIGatewayStatus.md)\n - [AlluxioCompTemplateSpec](docs/AlluxioCompTemplateSpec.md)\n - [AlluxioFuseSpec](docs/AlluxioFuseSpec.md)\n - [AlluxioRuntime](docs/AlluxioRuntime.md)\n - [AlluxioRuntimeList](docs/AlluxioRuntimeList.md)\n - [AlluxioRuntimeSpec](docs/AlluxioRuntimeSpec.md)\n - [CacheableNodeAffinity](docs/CacheableNodeAffinity.md)\n - [CleanCachePolicy](docs/CleanCachePolicy.md)\n - [Condition](docs/Condition.md)\n - [Data](docs/Data.md)\n - [DataBackup](docs/DataBackup.md)\n - [DataBackupList](docs/DataBackupList.md)\n - [DataBackupSpec](docs/DataBackupSpec.md)\n - [DataLoad](docs/DataLoad.md)\n - [DataLoadList](docs/DataLoadList.md)\n - [DataLoadSpec](docs/DataLoadSpec.md)\n - [DataMigrate](docs/DataMigrate.md)\n - [DataMigrateList](docs/DataMigrateList.md)\n - [DataMigrateSpec](docs/DataMigrateSpec.md)\n - [DataProcess](docs/DataProcess.md)\n - [DataProcessList](docs/DataProcessList.md)\n - [DataProcessSpec](docs/DataProcessSpec.md)\n - [DataRestoreLocation](docs/DataRestoreLocation.md)\n - [DataToMigrate](docs/DataToMigrate.md)\n - [Dataset](docs/Dataset.md)\n - [DatasetCondition](docs/DatasetCondition.md)\n - [DatasetList](docs/DatasetList.md)\n - [DatasetSpec](docs/DatasetSpec.md)\n - [DatasetStatus](docs/DatasetStatus.md)\n - [DatasetToMigrate](docs/DatasetToMigrate.md)\n - [EFCCompTemplateSpec](docs/EFCCompTemplateSpec.md)\n - [EFCFuseSpec](docs/EFCFuseSpec.md)\n - [EFCRuntime](docs/EFCRuntime.md)\n - [EFCRuntimeList](docs/EFCRuntimeList.md)\n - [EFCRuntimeSpec](docs/EFCRuntimeSpec.md)\n - [EncryptOption](docs/EncryptOption.md)\n - [EncryptOptionSource](docs/EncryptOptionSource.md)\n - [ExternalEndpointSpec](docs/ExternalEndpointSpec.md)\n - [ExternalStorage](docs/ExternalStorage.md)\n - [GooseFSCompTemplateSpec](docs/GooseFSCompTemplateSpec.md)\n - [GooseFSFuseSpec](docs/GooseFSFuseSpec.md)\n - [GooseFSRuntime](docs/GooseFSRuntime.md)\n - [GooseFSRuntimeList](docs/GooseFSRuntimeList.md)\n - [GooseFSRuntimeSpec](docs/GooseFSRuntimeSpec.md)\n - [HCFSStatus](docs/HCFSStatus.md)\n - [InitFuseSpec](docs/InitFuseSpec.md)\n - [InitUsersSpec](docs/InitUsersSpec.md)\n - [JindoCompTemplateSpec](docs/JindoCompTemplateSpec.md)\n - [JindoFuseSpec](docs/JindoFuseSpec.md)\n - [JindoRuntime](docs/JindoRuntime.md)\n - [JindoRuntimeList](docs/JindoRuntimeList.md)\n - [JindoRuntimeSpec](docs/JindoRuntimeSpec.md)\n - [JobProcessor](docs/JobProcessor.md)\n - [JuiceFSCompTemplateSpec](docs/JuiceFSCompTemplateSpec.md)\n - [JuiceFSFuseSpec](docs/JuiceFSFuseSpec.md)\n - [JuiceFSRuntime](docs/JuiceFSRuntime.md)\n - [JuiceFSRuntimeList](docs/JuiceFSRuntimeList.md)\n - [JuiceFSRuntimeSpec](docs/JuiceFSRuntimeSpec.md)\n - [Level](docs/Level.md)\n - [MasterSpec](docs/MasterSpec.md)\n - [Metadata](docs/Metadata.md)\n - [MetadataSyncPolicy](docs/MetadataSyncPolicy.md)\n - [Mount](docs/Mount.md)\n - [OSAdvise](docs/OSAdvise.md)\n - [OperationRef](docs/OperationRef.md)\n - [OperationStatus](docs/OperationStatus.md)\n - [PodMetadata](docs/PodMetadata.md)\n - [Processor](docs/Processor.md)\n - [Runtime](docs/Runtime.md)\n - [RuntimeCondition](docs/RuntimeCondition.md)\n - [RuntimeManagement](docs/RuntimeManagement.md)\n - [RuntimeStatus](docs/RuntimeStatus.md)\n - [ScriptProcessor](docs/ScriptProcessor.md)\n - [SecretKeySelector](docs/SecretKeySelector.md)\n - [TargetDataset](docs/TargetDataset.md)\n - [TargetDatasetWithMountPath](docs/TargetDatasetWithMountPath.md)\n - [TargetPath](docs/TargetPath.md)\n - [ThinCompTemplateSpec](docs/ThinCompTemplateSpec.md)\n - [ThinFuseSpec](docs/ThinFuseSpec.md)\n - [ThinRuntime](docs/ThinRuntime.md)\n - [ThinRuntimeList](docs/ThinRuntimeList.md)\n - [ThinRuntimeProfile](docs/ThinRuntimeProfile.md)\n - [ThinRuntimeProfileList](docs/ThinRuntimeProfileList.md)\n - [ThinRuntimeProfileSpec](docs/ThinRuntimeProfileSpec.md)\n - [ThinRuntimeSpec](docs/ThinRuntimeSpec.md)\n - [TieredStore](docs/TieredStore.md)\n - [User](docs/User.md)\n - [VersionSpec](docs/VersionSpec.md)\n - [VineyardCompTemplateSpec](docs/VineyardCompTemplateSpec.md)\n - [VineyardRuntime](docs/VineyardRuntime.md)\n - [VineyardRuntimeList](docs/VineyardRuntimeList.md)\n - [VineyardRuntimeSpec](docs/VineyardRuntimeSpec.md)\n - [VineyardSockSpec](docs/VineyardSockSpec.md)\n - [VolumeSource](docs/VolumeSource.md)\n - [WaitingStatus](docs/WaitingStatus.md)\n\n\n## Documentation For Authorization\n\n All endpoints do not require authorization.\n\n## Author\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluid-cloudnative%2Ffluid-client-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluid-cloudnative%2Ffluid-client-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluid-cloudnative%2Ffluid-client-python/lists"}