Skip to main content

Client Google Cloud Secret Manager

Project description

Arcane Secret Manager

Ce package est basé sur google-cloud-secret-manager.

Installation

pip install arcane-secretmanager

Utilisation

Initialisation avec clé de service

from arcane import secretmanager

# Avec un fichier de clé de service
client = secretmanager.Client('/path/to/service-account-key.json')

# Ou avec les credentials par défaut
client = secretmanager.Client()

Récupérer un secret

# Récupérer la dernière version d'un secret
value = client.get_secret_value('my-project', 'my-secret')

# Récupérer une version spécifique
value = client.get_secret_value('my-project', 'my-secret', '2')

Créer un secret

# Créer un nouveau secret
secret_name = client.create_new_secret('my-project', 'my-secret')

# Créer un secret avec des labels
secret_name = client.create_new_secret(
    'my-project', 
    'my-secret',
    labels={'env': 'production', 'team': 'backend'}
)

Ajouter une version

# Ajouter une nouvelle version à un secret existant
version_name = client.add_new_secret_version('my-project', 'my-secret', 'my-secret-value')

Lister les secrets

# Lister tous les secrets d'un projet
secrets = client.get_all_secrets('my-project')
for secret in secrets:
    print(f"Secret: {secret['name']}")

Supprimer un secret

# Supprimer un secret
client.remove_secret('my-project', 'my-secret')

Mettre à jour les labels

# Mettre à jour les labels d'un secret
client.update_secret_labels('my-project', 'my-secret', {'env': 'staging'})

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arcane_secretmanager-0.1.0.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arcane_secretmanager-0.1.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file arcane_secretmanager-0.1.0.tar.gz.

File metadata

  • Download URL: arcane_secretmanager-0.1.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.11 Linux/6.11.0-1018-azure

File hashes

Hashes for arcane_secretmanager-0.1.0.tar.gz
Algorithm Hash digest
SHA256 42b16eacb34297c62bf0fae1cc30939762d05c83028d3bc96cfa380f5a964172
MD5 30378ca9e746c5eada590faee0d0b67e
BLAKE2b-256 4bd24cfa51a1b0d872541734cc582d99bb0a31b7970ecd617b2393935ec16363

See more details on using hashes here.

File details

Details for the file arcane_secretmanager-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: arcane_secretmanager-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.11 Linux/6.11.0-1018-azure

File hashes

Hashes for arcane_secretmanager-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba6ba5fd3a118659d3f4596b5a4e80134bec512e2f5fc00c571fbe807ff47941
MD5 20810676b9ada3dab25ac9005dce9ed0
BLAKE2b-256 7c56f9f78320d51cffca585b9f74d7917e041ecb4051ff2cfb040a159a06253d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page