Skip to content

Data Sync

File system synchronization utilities for working with AWS storage services.

Overview

Module Description
File System File system abstractions
Operations Sync operations

Node dataclass

Node(
    path_part,
    parent=None,
    children=dict(),
    size_bytes=0,
    object_count=0,
    last_modified=BEGINNING_OF_TIME,
    is_path_part_prefix=False,
    is_path_part_suffix=False,
)

Represents an object or folder in an file system path.

Attributes:

Name Type Description
path_part str

Specifies the key part of the fs path (an edge) to this node.

parent Optional['Node']

Optionally specify the parent node to which this node is connected. By default, this is None.

children Dict[str, 'Node']

Child nodes that exist under this path prefix.

size_bytes int

The size (in bytes) of all objects under this path prefix.

object_count int

The number of objects under this path prefix.

last_modified datetime

The most recent date any objects under this prefix were last modified.

S3FileSystem dataclass

S3FileSystem(bucket, key)

Bases: BaseFileSystem

Generates a FS tree structure of an S3 path with size and object count stats.

Attributes:

Name Type Description
bucket str

The S3 bucket to describe.

key str

The S3 key to describe.