Metadata-Version: 2.4
Name: apfio
Version: 0.0.2
Summary: Apfio packs files into one
Project-URL: Homepage, https://apfio.mpi-inf.mpg.de/
Author: Gereon Fox
License-Expression: MPL-2.0
License-File: LICENSE.txt
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Requires-Dist: numpy>=2.3.5
Description-Content-Type: text/markdown

# 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:

```python
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](https://www.mpi-inf.mpg.de) in Saarbrücken. Documentation is available under [https://apfio.mpi-inf.mpg.de/](https://apfio.mpi-inf.mpg.de/)
