Skip to main content

The Redid CLI tools provide a simple way to work with the Redid service.

pip install redid_tools

After install you will need to configure the tools. This simply sets the account information needed to connect to Redid.

redid setup

You can check that your credentials are correct by running the check-auth command.

redid check-auth

redid

redid offers a command line interface to much of the REST API. Use redid --help to see a list of options and commands.

redid-sync

redid-sync synchronizes a local directory to a remote Redid path. This is a relatively quick and simple way to store resources.

redid-sync local/path/ remote/prefix/

The files from local/path/ will be uploaded as resources to remote/prefix/. For example, a file named local/path/sunset.jpg will be uploaded to the resource named remote/prefix/sunset witha content-type of image/jpeg.

The synchronization tool does not upload a file if the binary hash matches the one already on the server. This makes it relatively quick to make small changes and rerun synchronization. If you however need to upload the same file a lot for testing, you might wish to use redid upload-resource instead. redid-sync always has to list the remote resources first, which could be a bit slow for repeated quick use.

Files starting with a . are not uploaded.

The local path will be recursively scanned and the entire tree uploaded.

.redid.yaml

You can control the behaviour of synchronization with the .redid.yaml file, located in the root of your local synchronization folder. For example, local/path/.redid.yaml.

remote_delete_missing

By default redid-sync will not delete remote resources that do not exist locally. This is a safety feature to prevent accidental deletion. To enable remote delete set the remote_delete_missing option to True:

remote_delete_missing: True

ext_map

The file type of a local file will be guessed (using Python’s mimetypes module, and a few extra rules). If you have special files that should be uploaded with a different content-type you can use the ext_map entry. This is a map of extension to content-type.

ext_map:
    ".bin": image/x-private-binary
    ".xpng": image/ping

To get the resource name of a resource this extension will be dropped. For example document.bin will be uploaded as resource document with the content-type image/x-private-binary.

Just let us know if you need any other mapping features.

Configuration

By default the CLI uses the configuration file ~/.redid.yaml. This can be overridden with the --config option. Or you can specify the REDID_CONFIG_FILE environment variable.

For ls-resources the REDID_LS_RESOURCES_COLS can be used to specify the --cols setting.

Metadata

Release files for redid_tools 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for redid_tools 0.2
File Size Uploaded
redid_tools-0.2.tar.gz 10.4 kB Details

Release files / redid_tools-0.2.tar.gz

Download URL redid_tools-0.2.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8ae81f4e44986d76304e1c896a8542675997cb2f7e979c08160a053c12fd9ce6
BLAKE2b-256 checksum
How to use checksums
6ff506be0de64b481ac4266daf8ca915939e9b3f9de9ea8ff32a276f141952f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page