quilt
Search…
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.
1
import quilt3
2
p = quilt3.Package()
3
4
top_hash = p.build("aneesh/test_data")
Copied!
Building a package requires providing it with a name. Packages 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, if you haven't done so already:
1
# only need to run this once
2
# ie quilt3.config('https://your-catalog-homepage/')
3
quilt3.config('https://open.quiltdata.com/')
4
5
# follow the instructions to finish login
6
quilt3.login()
Copied!

Pushing a package to a remote registry

To share a package with others via a remote registry, use push:
1
p = quilt3.Package()
2
p.push(
3
"aneesh/test_data",
4
"s3://quilt-example",
5
message="Updated version my package"
6
)
Copied!
s3://quilt-example is the registry—the storage backend that the package is available from.
You can omit the registry argument if you configure a default_remote_registry (this setting persists between sessions):
1
quilt3.config(default_remote_registry='s3://quilt-example')
2
p = quilt3.Package()
3
p.push("aneesh/test_data")
Copied!
You can control where files land using dest:
1
p = quilt3.Package()
2
p.push(
3
"aneesh/test_data",
4
dest="s3://quilt-example/foo/bar"
5
)
Copied!
For even more fine-grained control of object landing paths see Materialization.

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:
1
p = quilt3.Package()
2
p.build("aneesh/test_data", "s3://quilt-example")
Copied!
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:
1
# delete a package in the local registry
2
quilt3.delete_package("aneesh/test_data")
3
4
# delete a package in a remote registry
5
quilt3.delete_package("aneesh/test_data", "s3://quilt-example")
Copied!
Note that this will not delete any package data, only the package manifest.
Last modified 1mo ago