Skip to main content

Apfio packs files into one

Project description

apfio

apfio packs files into one: It gives you Python objects that look like arrays, but are backed by *.zip files on disk. Here is an example:

from PIL import Image
from apfio.data import sunset, flower
from apfio.vision.file import vopen

# Store images in ZIP file.
with vopen("myimages.zip", mode='w', shape=(2, ), fmt=ImageFormat.AVIF) as array:
    array[0] = flower()
    array[1] = sunset()

# Read images from ZIP file.
with vopen("myimages.zip", mode='r') as array:
    for idx, cell in enumerate(array):
        with Image.fromarray(cell.point()) as image:
            image.save(f"image{idx}.jpg")

For this example to work you must install the additional packages apfio-imaging and apfio-vision.

Documentation

Apfio is developed at the Max Planck Institute for Informatics in Saarbrücken. Documentation is available under https://apfio.mpi-inf.mpg.de/

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

apfio-0.0.2.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

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

apfio-0.0.2-py3-none-any.whl (35.8 kB view details)

Uploaded Python 3

File details

Details for the file apfio-0.0.2.tar.gz.

File metadata

  • Download URL: apfio-0.0.2.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for apfio-0.0.2.tar.gz
Algorithm Hash digest
SHA256 178e220a4de176da3e08fffa0e96308eb7480256ff67b2bd109796aec49fb743
MD5 664f639ae3f9606cc2c5e025bf0e6195
BLAKE2b-256 5e317b0ac78112e32f55a8adee8c1a6d04ea9f0e2f8f1d52be50eceffac0985d

See more details on using hashes here.

File details

Details for the file apfio-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: apfio-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 35.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for apfio-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a52b1bf351c656f484e535e5e029a2b3562e469cfa01e23999b35660e906a765
MD5 45d6b4fdc9d41ca668d0c43016ca52a7
BLAKE2b-256 14cb0559e7f1ec441ef55fe5264333e899c754c066054f0e2d355f777344969a

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