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.3.1.1.tar.gz (5.4 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.3.1.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for zipindex-1.3.1.1.tar.gz
Algorithm Hash digest
SHA256 967a2ab1b241b901cd00eab728b4e9e9b217f6b1a44bee018c23184c3ca91b7c
MD5 8f090592552501495a456ee2564d3c8d
BLAKE2b-256 87c1219360556d02258f4cf41e528374fef86df57f08cbb4b3880cf60c140ae6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zipindex-1.3.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 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.3.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c6451e459cb8e519dff3c48c2040a2baef4a23d2b8b28eebd39e8ed129c6b5f8
MD5 efc5e58ecdf2b5bd58f8ca8218df4bfe
BLAKE2b-256 ebec77932fc3f72a3f805abe17ba463d5924c31e573724939ddebf63516e1de0

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