No description
  • Python 99.9%
  • Shell 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-04-23 22:33:59 +02:00
.github/workflows Regenerate python admin SDK 2026-01-06 10:21:58 +01:00
.openapi-generator update for garage v2.3.0 2026-04-23 22:33:59 +02:00
docs update for garage v2.3.0 2026-04-23 22:33:59 +02:00
garage_admin_sdk update for garage v2.3.0 2026-04-23 22:33:59 +02:00
test update for garage v2.3.0 2026-04-23 22:33:59 +02:00
.gitignore Regenerate python admin SDK 2026-01-06 10:21:58 +01:00
.gitlab-ci.yml build openapi client for garage v2 2025-06-14 17:31:39 +02:00
.openapi-generator-ignore Initial commit 2022-11-13 14:21:12 +01:00
.travis.yml build openapi client for garage v2 2025-06-14 17:31:39 +02:00
git_push.sh Update git URL 2022-11-13 15:54:27 +01:00
pyproject.toml Regenerate python admin SDK 2026-01-06 10:21:58 +01:00
README.md update for garage v2.3.0 2026-04-23 22:33:59 +02:00
requirements.txt build openapi client for garage v2 2025-06-14 17:31:39 +02:00
setup.cfg Initial commit 2022-11-13 14:21:12 +01:00
setup.py update for garage v2.3.0 2026-04-23 22:33:59 +02:00
test-requirements.txt build openapi client for garage v2 2025-06-14 17:31:39 +02:00
tox.ini Initial commit 2022-11-13 14:21:12 +01:00

garage-admin-sdk-python

Administrate your Garage cluster programmatically, including status, layout, keys, buckets, and maintenance tasks.

Disclaimer: This API may change in future Garage versions. Read the changelog and upgrade your scripts before upgrading. Additionally, this specification is early stage and can contain bugs, so be careful and please report any issues on our issue tracker.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: v2.3.0
  • Package version: 2.1.0.1
  • Generator version: 7.18.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://garagehq.deuxfleurs.fr/

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-python.git

(you may need to run pip with root permission: sudo pip install git+https://git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-python.git)

Then import the package:

import garage_admin_sdk

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import garage_admin_sdk

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:


import garage_admin_sdk
from garage_admin_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:3903
# See configuration.py for a list of all supported configuration parameters.
configuration = garage_admin_sdk.Configuration(
    host = "http://localhost:3903"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = garage_admin_sdk.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with garage_admin_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = garage_admin_sdk.AccessKeyApi(api_client)
    body = garage_admin_sdk.UpdateKeyRequestBody() # UpdateKeyRequestBody | 

    try:
        api_response = api_instance.create_key(body)
        print("The response of AccessKeyApi->create_key:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AccessKeyApi->create_key: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost:3903

Class Method HTTP request Description
AccessKeyApi create_key POST /v2/CreateKey
AccessKeyApi delete_key POST /v2/DeleteKey
AccessKeyApi get_key_info GET /v2/GetKeyInfo
AccessKeyApi import_key POST /v2/ImportKey
AccessKeyApi list_keys GET /v2/ListKeys
AccessKeyApi update_key POST /v2/UpdateKey
AdminAPITokenApi create_admin_token POST /v2/CreateAdminToken
AdminAPITokenApi delete_admin_token POST /v2/DeleteAdminToken
AdminAPITokenApi get_admin_token_info GET /v2/GetAdminTokenInfo
AdminAPITokenApi get_current_admin_token_info GET /v2/GetCurrentAdminTokenInfo
AdminAPITokenApi list_admin_tokens GET /v2/ListAdminTokens
AdminAPITokenApi update_admin_token POST /v2/UpdateAdminToken
BlockApi get_block_info POST /v2/GetBlockInfo
BlockApi list_block_errors GET /v2/ListBlockErrors
BlockApi purge_blocks POST /v2/PurgeBlocks
BlockApi retry_block_resync POST /v2/RetryBlockResync
BucketApi cleanup_incomplete_uploads POST /v2/CleanupIncompleteUploads
BucketApi create_bucket POST /v2/CreateBucket
BucketApi delete_bucket POST /v2/DeleteBucket
BucketApi get_bucket_info GET /v2/GetBucketInfo
BucketApi inspect_object GET /v2/InspectObject
BucketApi list_buckets GET /v2/ListBuckets
BucketApi update_bucket POST /v2/UpdateBucket
BucketAliasApi add_bucket_alias POST /v2/AddBucketAlias
BucketAliasApi remove_bucket_alias POST /v2/RemoveBucketAlias
ClusterApi connect_cluster_nodes POST /v2/ConnectClusterNodes
ClusterApi get_cluster_health GET /v2/GetClusterHealth
ClusterApi get_cluster_statistics GET /v2/GetClusterStatistics
ClusterApi get_cluster_status GET /v2/GetClusterStatus
ClusterLayoutApi apply_cluster_layout POST /v2/ApplyClusterLayout
ClusterLayoutApi cluster_layout_skip_dead_nodes POST /v2/ClusterLayoutSkipDeadNodes
ClusterLayoutApi get_cluster_layout GET /v2/GetClusterLayout
ClusterLayoutApi get_cluster_layout_history GET /v2/GetClusterLayoutHistory
ClusterLayoutApi preview_cluster_layout_changes POST /v2/PreviewClusterLayoutChanges
ClusterLayoutApi revert_cluster_layout POST /v2/RevertClusterLayout
ClusterLayoutApi update_cluster_layout POST /v2/UpdateClusterLayout
NodeApi create_metadata_snapshot POST /v2/CreateMetadataSnapshot
NodeApi get_node_info GET /v2/GetNodeInfo
NodeApi get_node_statistics GET /v2/GetNodeStatistics
NodeApi launch_repair_operation POST /v2/LaunchRepairOperation
PermissionApi allow_bucket_key POST /v2/AllowBucketKey
PermissionApi deny_bucket_key POST /v2/DenyBucketKey
SpecialEndpointsApi check_domain GET /check
SpecialEndpointsApi health GET /health
SpecialEndpointsApi metrics GET /metrics
WorkerApi get_worker_info POST /v2/GetWorkerInfo
WorkerApi get_worker_variable POST /v2/GetWorkerVariable
WorkerApi list_workers POST /v2/ListWorkers
WorkerApi set_worker_variable POST /v2/SetWorkerVariable

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication

Author

garagehq@deuxfleurs.fr