Skip to main content

Light Data Versioning

Project description

ldv

Light Data Versioning

Ldv is a tool for version tracking big files on a remote storage and storing digest files together with code that uses the big files. A digest file is a small file containing information about the file to version track. The information includes file size in bytes, timestamp of version, hexdigest (the version number), and local and remote filepaths.

Ldv can be run from the command line or from code, using the APIs of the package.

Ldv has no external dependencies on other programs, e.g. Git.

Currently, only AWS is supported as remote storage.

Getting started

Installation

This will install the package to version track on AWS remote storage.

pip install ldv

Usage

1. Authentication

Authenticate with remote storage provider.

ldv auth aws -rn <region_name> [-pn <profile name>] [-ec]
  • -rn is the region name where the bucket is located.
  • -pn is the name of the profile specified in ~/.aws/config
  • -ec Use credentials stored in environment variables. LDV_AWS_ACCESS_KEY_ID and LDV_AWS_SECRET_ACCESS_KEY must be set. Will not be used if profile is provided.

You either use -pn or -ec, not both.

Example:

ldv auth aws -rn eu-west-1 -pn dev-profile

2. Initialize

Initialize the local base path you want to version track files under. Also specify the remote storage url.

ldv init -p <path> -u <url> [-rta] [-du]
  • -p specifies the local path that contains files to version track.
  • -u is the remote storage url, e.g. s3://my_bucket/sub_folder.
  • -rta is an optional flag will run version tracking of all files under the path.
  • -du is an optional flag will prevent files from being uploaded to remote storage every time you version track them. Use this if you only want to create a digest files locally but not upload the files to remote storage.

Example:

ldv init -p local-data-folder -u s3://my_s3_bucket/sub_folder

Version track file

ldv versioning track <file path> [-du]
  • file path to version track. Can be absolute or relative path but must be under path provided when running 'init' command.
  • -du is optional flag if you don't want to upload the file.

Example:

ldv versioning track local-data-folder/first_file.txt

Version track all files

Version track all files under path specified in the 'init' command.

ldv versioning track-all [-du]
  • -du is optional flag if you don't want to upload the files.

Download file

Download file from remote storage to local storage.

ldv versioning download <file path to digest file> [-v <version>]
  • -v is the optional version. If not provided, the version in the .digest file will be used.

Download all files

Download all files under folder specified in 'init' command.

ldv versioning download-all

List versions of file

ldv versioning list-versions <path to digest file>

Example:

ldv versioning list-versions local-data-folder/first_file.txt.digest

Contact

Martin Neumann, ldv@martinneumann.se

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

ldv-0.1.5.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

ldv-0.1.5-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

Details for the file ldv-0.1.5.tar.gz.

File metadata

  • Download URL: ldv-0.1.5.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for ldv-0.1.5.tar.gz
Algorithm Hash digest
SHA256 16ad02bfe277dc904d85623de729d558c05828c3786850d8fb15aab8d5dbca55
MD5 142ac07a9e015e2f1794c1c159f4b211
BLAKE2b-256 6078606e2c17741fe6ebf82ecb8153e3870baa0ecf38aa2cadc74ce1936906ba

See more details on using hashes here.

File details

Details for the file ldv-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: ldv-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 32.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for ldv-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 24a7d468c02ed0eb39b1166002c97d3ec9a3bf8153241f9808d3c3d4112c39a1
MD5 98d0964cd65b2d3f4d641a25092b9fdf
BLAKE2b-256 e567d2639fb8ae37b5bccfa3815dd867fe1bfedf2d3c69a567e2f9eb4f736f98

See more details on using hashes here.

Supported by

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