Skip to main content

Core library for Elasticsearch S3 Glacier archival - shared between curator and standalone deepfreeze

Project description

Elastic Deepfreeze Core

Core library for Elasticsearch S3 Glacier archival operations.

Overview

This package provides the shared functionality for deepfreeze operations, used by both:

  • elastic-deepfreeze-cli: Standalone CLI tool
  • elasticsearch-curator: Full Curator with deepfreeze support

Installation

pip install elastic-deepfreeze-core

Or from source:

pip install git+https://github.com/elastic/deepfreeze.git#subdirectory=packages/elastic-deepfreeze-core

Usage

This package is typically used as a dependency by other packages. For direct usage:

from elastic_deepfreeze_core import (
    Setup, Status, Rotate, Thaw, Refreeze, Cleanup, RepairMetadata,
    s3_client_factory, create_es_client
)

# Create ES client
client = create_es_client(hosts=["https://localhost:9200"], username="elastic", password="changeme")

# Create and run an action
status = Status(client=client)
status.do_action()

Components

Actions

  • Setup - Initialize deepfreeze environment
  • Status - Display status of repositories and thaw requests
  • Rotate - Create new repository, archive old ones to Glacier
  • Thaw - Restore data from Glacier storage
  • Refreeze - Return thawed data to Glacier
  • Cleanup - Remove expired repositories and requests
  • RepairMetadata - Fix metadata discrepancies

Utilities

  • s3_client_factory - Create S3 client for AWS
  • create_es_client - Create Elasticsearch client
  • Repository and Settings management functions

Development

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black elastic_deepfreeze_core/
ruff check elastic_deepfreeze_core/

Why "elastic-deepfreeze-core"?

The package name includes the elastic- prefix to prevent dependency confusion attacks. See the main README for details.

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

elastic_deepfreeze_core-1.0.0.tar.gz (55.5 kB view details)

Uploaded Source

Built Distribution

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

elastic_deepfreeze_core-1.0.0-py3-none-any.whl (68.3 kB view details)

Uploaded Python 3

File details

Details for the file elastic_deepfreeze_core-1.0.0.tar.gz.

File metadata

  • Download URL: elastic_deepfreeze_core-1.0.0.tar.gz
  • Upload date:
  • Size: 55.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for elastic_deepfreeze_core-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4b771d55217bae67a226c2cdb190285f5597b11736e423ccd80b72ef813fd0d0
MD5 4cb638182987b114fc5e0bef882d1c9b
BLAKE2b-256 e7f0b398a2039dcb6de05ac3ccfbce2009402b2d64481558a4e5fe715e5067ad

See more details on using hashes here.

File details

Details for the file elastic_deepfreeze_core-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for elastic_deepfreeze_core-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f562b5bd8acb429cfeb4e1b752b4983ddef9ccfe41fa0005d8f32af3290c6f95
MD5 883ae9db144c0e6a959efd4cc3bd9dc0
BLAKE2b-256 a9055a51ee058f87a53e8761c07e64e1b3ed9fa6e2165e190a027a7cfdf3e17d

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