Skip to main content

The file format behind TACO.

Project description

Open in Colab

The Tortilla Reader

What is Tortilla?

A Tortilla is an open-source, cloud-optimized format for storing large collections of files (referred to as "items") in a Binary Large Object (BLOB). It is quite simple, similar to safetensor and puffin, but designed for seamless compatibility with the Geospatial Data Abstraction Library (GDAL) Virtual File System.

Specification

Read the full specification here.

Installation

You can install the Tortilla reader using pip:

pip install pytortilla

Usage

The tortilla reader only support three methods: create, load, and compile.

Create

Create a Tortilla file from a list of local files.

import pytortilla

files = ["path/to/local/A.tif", "path/to/local/B.tif", "path/to/local/C.tif"]

tortilla_file = pytortilla.create(
    files=files,
    output= "path/to/local/demo.tortilla"
)

Load

Load local and remote Tortilla files. For remote files, the server must support the HTTP Range header method.

import pytortilla

# either local or remote you can load a Tortilla file with the same function

## local
tortilla_file = pytortilla.load(
    file="path/to/local/demo.tortilla"
)

## remote
tortilla_file = pytortilla.load(
    file="https://huggingface.co/datasets/tacofoundation/example/resolve/main/soy_una.tortilla"
)

Compile

Create small subsets of the Tortilla file. For instance, if you have a Tortilla file with 1000 items, you can create a new Tortilla file with only the first 100 items.

import pytortilla

# Load a Tortilla file
metadata = pytortilla.load(file="https://huggingface.co/datasets/tacofoundation/example/resolve/main/soy_una.tortilla")


# Create a new Tortilla file
subset = pytortilla.compile(
    dataset=metadata.iloc[40:50],
    output="soy_una_feliz.tortilla"
)

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

pytortilla-0.1.0a0.tar.gz (28.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytortilla-0.1.0a0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file pytortilla-0.1.0a0.tar.gz.

File metadata

  • Download URL: pytortilla-0.1.0a0.tar.gz
  • Upload date:
  • Size: 28.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/7.0.1 keyring/24.3.1 pkginfo/1.9.6 readme-renderer/34.0 requests-toolbelt/1.0.0 requests/2.32.3 rfc3986/1.5.0 tqdm/4.66.5 urllib3/2.2.1 CPython/3.10.12

File hashes

Hashes for pytortilla-0.1.0a0.tar.gz
Algorithm Hash digest
SHA256 35cccf49c11446a9510803dc7a528987890dc5f16edfe8366292b7d14a46aef1
MD5 11f0c3b4241faecdceb9f949dfffe0a2
BLAKE2b-256 08a69be20e35682d03a057a651d0a9a4c8ecbf966128ce0e0018c9c48116c7d6

See more details on using hashes here.

File details

Details for the file pytortilla-0.1.0a0-py3-none-any.whl.

File metadata

  • Download URL: pytortilla-0.1.0a0-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/7.0.1 keyring/24.3.1 pkginfo/1.9.6 readme-renderer/34.0 requests-toolbelt/1.0.0 requests/2.32.3 rfc3986/1.5.0 tqdm/4.66.5 urllib3/2.2.1 CPython/3.10.12

File hashes

Hashes for pytortilla-0.1.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ac2473e4cc1f87ae6c24918cd6208fd7341808d5d277c3c1d23a2779f3b323a
MD5 5b217608b147a0299ee77f80d8880670
BLAKE2b-256 ef2706213d591825caca5216960e4e6363aa3d8b591ebef256bddde10099065c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page