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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7e3fedabd3aa8de6466e041e72a465b0ff0d58825175cdfb3b84b15b2c4a9c2
|
|
| MD5 |
db348a68814064e5d1f7811dfb28a6fd
|
|
| BLAKE2b-256 |
28069d5dcbb93eead250c0ff45681a3e905aa5eab05084aabf6553b699cc1dc5
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcd5675d24a4359739a9454ec20f417f148dd157132466dddb286a13724d943f
|
|
| MD5 |
dd011720f025c01bd9f2ed1cc5e7004c
|
|
| BLAKE2b-256 |
1781d575dae1cdb0fd152d4f107ae99608e9f383b256a69b6db395c59f6f2ace
|