low-level plubming to read/write Quilt packages
Project description
QuiltCore
QuiltCore is a library for building and running Quilt data packages. It is designed to leverage standard open source technology and YAML configuration files so that it can easily be ported to other languages and platforms.
This initial implementation is in Python.
Key Technologies
- Apache Arrow for reading, writing, and representing manifests
- PyArrow for Python bindings to Arrow
- fsspec filesystems for reading and writing files from various sources
- PyYAML for reading and writing YAML configuration files
Example
poetry install
from quiltcore import Registry
from tempfile import TemporaryDirectory
from upath import UPath
TEST_BKT = "s3://quilt-example"
TEST_PKG = "akarve/amazon-reviews"
TEST_TAG = "1570503102"
TEST_HASH = "ffe323137d0a84a9d1d6f200cecd616f434e121b3f53a8891a5c8d70f82244c2"
TEST_KEY = "camera-reviews"
Get Manifest
path = UPath(TEST_BKT)
registry = Registry(path)
named_package = registry.get(TEST_PKG)
manifest = named_package.get(TEST_TAG)
entry = manifest.get(TEST_KEY)
Get Object
with TemporaryDirectory() as tmpdir:
dest = UPath(tmpdir)
outfile = dest / TEST_KEY
entry.get(tmpdir)
print(outfile.resolve())
assert outfile.exists()
local_bytes = outfile.read_bytes()
assert entry.verify(local_bytes)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
quiltcore-0.3.2.tar.gz
(19.6 kB
view details)
Built Distribution
quiltcore-0.3.2-py3-none-any.whl
(26.1 kB
view details)
File details
Details for the file quiltcore-0.3.2.tar.gz
.
File metadata
- Download URL: quiltcore-0.3.2.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.0 CPython/3.10.11 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 381189dce710750eacdd45635cddefca43f7ffe8f5e3449a8c5828ad4c623f87 |
|
MD5 | a64b4baca9863a41e5ece1ec7236c857 |
|
BLAKE2b-256 | 18bb23d2ebd7fb86d85a7d5d6b1cf3045bea822054a6c4d27544b99f184f33e8 |
File details
Details for the file quiltcore-0.3.2-py3-none-any.whl
.
File metadata
- Download URL: quiltcore-0.3.2-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.0 CPython/3.10.11 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89c9a2bf1545f3f0b20093e011ba2708bd8973fac95cad88d3566df14083f7db |
|
MD5 | f636541ddf09fe1aef656ac671fcf933 |
|
BLAKE2b-256 | 5be7eccc95914dfba92243e81ae13e8f071cb61ee14febf728f70182a6660d24 |