Skip to main content

Synchronize Anaconda environments to/from Amazon S3

Project description

Synchronize Anaconda environments to/from Amazon S3

Installation

Run pip install conda-s3-sync, or python ./setup.py

Usage

positional arguments:
  BUCKET[/PATH]         Bucket and path of S3 location to synchronize to/from

optional arguments:
  -h, --help            show this help message and exit
  --path-filter PATH_FILTER
                        Regular expression of env paths to include
  --conda-bin CONDA_BIN
                        Path to conda-binary
  --aws-region AWS_REGION
                        AWS region to connect to
  --include-root-env    Include root Anaconda environment in addition to any
                        custom envs

AWS credentials should be set up using IAM roles, or the usual environment variables (such as AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_DEFAULT_REGION).

Operation

Upon execution, the list of currently available Anaconda environments in the local system will be gathered, as will the environments exported to S3. Any environments that are found missing on either side will be synchronized, by exporting the local environment and pushing the resulting YAML description to S3, or by creating a new environment from the remote description.

Similarly, if environments are present both locally and remotely, synchronization is performed from the one modified most recently to the one modified least recently.

Local modification time is determined (and persisted) in the env_path/conda-meta/history file modification time.

Remote modification time is stored as a custom metadata entry in the S3 objects, as AWS does not allow setting a custom LastModified time.

License (MIT)

Copyright (C) 2017 Cobli

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

conda-s3-sync-0.1.1.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

conda_s3_sync-0.1.1-py2.py3-none-any.whl (8.1 kB view hashes)

Uploaded Python 2 Python 3

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