Uploading a Package
Once your package is ready it's time to save and distribute it.
Saving a package manifest locally
To save a package to your local disk use build.
import quilt3
p = quilt3.Package()
top_hash = p.build("aneesh/test_data")Building a package requires providing it with a name. Package names must follow the "${namespace}/${packagename}" format. For small teams, we recommend using the package author's name as the namespace.
Authenticating to a remote registry
To share a package with others via a remote registry you will first need to authenticate against it, if you haven't done so already:
# only need to run this once
# replace with your organization's own catalog homepage
quilt3.config('https://your-catalog-homepage/')
# follow the instructions to finish login
quilt3.login()Pushing a package to a remote registry
To share a package with others via a remote registry, use push:
s3://your-bucket is the registry—the storage backend that the package is available from. Replace it with an S3 bucket that is attached to your catalog and that you have write access to.
push returns the package it published; keep it, as above, to push further revisions (see Pushing again below).
You can omit the registry argument if you configure a default_remote_registry (this setting persists between sessions):
You can control where files land using dest:
For even more fine-grained control of object landing paths see Materialization.
Pushing again: revision conflicts
push will not overwrite a package revision it does not descend from. A push succeeds only if the destination has no revision yet, or its latest revision is one your in-memory package "knows about" — i.e. it was obtained via Package.browse() or returned by a previous push. Otherwise push raises QuiltConflictException. This protects two writers from silently clobbering each other's revisions.
The recommended pattern for updating an existing package is browse-then-push:
Two keyword arguments modify this behavior:
force=Trueskips the conflict check and overwrites the latest revision (CLI:quilt3 push --force).dedupe=Trueskips the push entirely if the package content is identical to the latest revision at the destination.
Saving a package on a remote registry
push will send both a package manifest and its data to a remote registry. This will involve copying your data to S3. To save just the package manifest to S3 without any data copying, use build:
This will create a new version of your package with all of its physical keys preserved.
Delete a package from a registry
To delete a package from a registry:
Note that this will not delete any package data, only the package manifest.
Last updated
Was this helpful?

