Skip to main content

Simple indexing for working with files inside zipfiles

Project description

ZipIndex

Simple, pure-python object package for dealing with many files inside of zipfiles.

Example Usage

from zipindex import ZipItem

# Single Instance
inst = ZipItem(zipfile_path="...", member_name="...")

# Simple Factory
members: dict[str, ZipItem] = ZipItem.factory(zipfile_path="...")

# Patterned Factory - Requires some knowledge of the contents
files_patt: dict[str, ZipItem] = ZipItem.factory(zipfile_path="...",
                                                 pattern=r"^data/.*.csv$")

# File Extension Factory
files_ext = dict[str, ZipItem] = ZipItem.factory(zipfile_path="...", 
                                                 extensions=[".csv"])

# Categorical Factory
categories: dict[str, list[ZipItem]] = ZipItem.factory(zipfile_path="...",
                                                       categories={"empty" : {0 : b""}})

Behavior

The categories factory keyword will always return a dictionary with lists of items as its values, while without the factory will always return a dictionary with items as values instead.

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

zipindex-1.2.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

zipindex-1.2.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file zipindex-1.2.0.tar.gz.

File metadata

  • Download URL: zipindex-1.2.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for zipindex-1.2.0.tar.gz
Algorithm Hash digest
SHA256 df50be2a2ab127224178f8f7bc41642cfe1c8814f1a8117b1ba596c2c5b506cb
MD5 f41c31f903f698ae2aad70bc31fb384a
BLAKE2b-256 609a12079ea12c84f6e7b9817cd53517f41690b7b88f501957f33007d1bfdc02

See more details on using hashes here.

File details

Details for the file zipindex-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: zipindex-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for zipindex-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c737752e3b809aae4943f170379fbcb188d4bda9c6d1ebd2d0e352c92d99c0d
MD5 a4f1899d492fa268e455218e69cd1096
BLAKE2b-256 2caaf442c408ea2e5c4550181c3f41eaae986c3d91210afb5ccc5bb6e84d0ab2

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