Skip to main content

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'})

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.1.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.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for arcane_secretmanager-0.1.1.tar.gz
Algorithm Hash digest
SHA256 85e154b54511ba30623019f6940fad141b48595817653fcc44234ac8af457935
MD5 9945a31d277b526d0fba8986d1806138
BLAKE2b-256 f6bcab9956baed67d6ce7d820f68e98d643d53dbdbf2842d50b00c3bc5ae99fe

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for arcane_secretmanager-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0314664b65e885e8cba71ef278d6ac08552e247abb0bd4c7c668b561b5d3fc03
MD5 fc5f3726fdf14ce80361d2fcef3b5e7b
BLAKE2b-256 829719583930428aed0d1c29432f5130903274d1e2989322b4419f1a56a7f079

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

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