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.1.tar.gz (28.7 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.1-py3-none-any.whl (40.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for apfio-0.1.tar.gz
Algorithm Hash digest
SHA256 e7e3fedabd3aa8de6466e041e72a465b0ff0d58825175cdfb3b84b15b2c4a9c2
MD5 db348a68814064e5d1f7811dfb28a6fd
BLAKE2b-256 28069d5dcbb93eead250c0ff45681a3e905aa5eab05084aabf6553b699cc1dc5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apfio-0.1-py3-none-any.whl
  • Upload date:
  • Size: 40.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dcd5675d24a4359739a9454ec20f417f148dd157132466dddb286a13724d943f
MD5 dd011720f025c01bd9f2ed1cc5e7004c
BLAKE2b-256 1781d575dae1cdb0fd152d4f107ae99608e9f383b256a69b6db395c59f6f2ace

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