Skip to main content

💪 Elbow

Build codecov Code style: black MIT License

Elbow is a lightweight and scalable library for getting diverse data out of specialized formats and into common tabular data formats for downstream analytics.

Example

Extract image metadata and pixel values from all JPEG image files under the current directory and save as a Parquet dataset.

import numpy as np
import pandas as pd
from PIL import Image

from elbow.builders import build_parquet

def extract_image(path: str):
    img = Image.open(path)
    width, height = img.size
    pixel_values = np.asarray(img)
    return {
        "path": path,
        "width": width,
        "height": height,
        "pixel_values": pixel_values,
    }

build_parquet(
    source="**/*.jpg",
    extract=extract_image,
    output="images.pqds/",
    workers=8,
)

df = pd.read_parquet("images.pqds")

For a complete example, see here.

Installation

pip install elbow

The current development version can be installed with

pip install git+https://github.com/cmi-dair/elbow.git

There are many other high quality projects for extracting, loading, and transforming data. Some alternative projects focused on somewhat different use cases are:

Contributing

We welcome contributions of any kind! If you'd like to contribute, please feel free to start a conversation in our issues.

Metadata

Release files for elbow 0.1.1

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

Source distribution (sdist)

Source distribution for elbow 0.1.1
File Size Uploaded
elbow-0.1.1.tar.gz 38.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for elbow 0.1.1
File Interpreter ABI Platform
elbow-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 68.3 kB

Release files / elbow-0.1.1.tar.gz

Download URL elbow-0.1.1.tar.gz
Size 38.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a720257498895d07915bf63c7ccf11f596d8990fb47da3530079ded9a88f5116
BLAKE2b-256 checksum
How to use checksums
a295343d201e685056a62299bf4006a4290e6e218b57cbea4ed513606aa441fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.17

Release files / elbow-0.1.1-py3-none-any.whl

Download URL elbow-0.1.1-py3-none-any.whl
Size 29.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c37c19e3d7f5af5a069c7fffd3714c09148317480fc0d457cca0c8b683ec3878
BLAKE2b-256 checksum
How to use checksums
3adfbf08bb8bcd5b445e29e478483b174873d12d4ae553382d5f9eeae739ed6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.17
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