{"id":13725070,"url":"https://github.com/sandes/zipfly","last_synced_at":"2026-04-05T17:40:10.346Z","repository":{"id":39625911,"uuid":"249584861","full_name":"sandes/zipfly","owner":"sandes","description":"Python Zip Stream","archived":false,"fork":false,"pushed_at":"2025-10-01T12:50:57.000Z","size":666,"stargazers_count":529,"open_issues_count":6,"forks_count":26,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-04-05T17:39:41.248Z","etag":null,"topics":["buzon","compression","memory-inflation","python","streaming","zipfile","zipfly"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sandes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-03-24T01:36:38.000Z","updated_at":"2026-03-30T05:43:21.000Z","dependencies_parsed_at":"2025-05-07T19:39:50.900Z","dependency_job_id":"957b9e0c-cd38-42a7-a329-7cbbf198849d","html_url":"https://github.com/sandes/zipfly","commit_stats":{"total_commits":431,"total_committers":8,"mean_commits":53.875,"dds":0.03944315545243615,"last_synced_commit":"ecaf73aefde43f8222cbdf35d729d764e0a11b4a"},"previous_names":["buzonio/zipfly"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/sandes/zipfly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandes%2Fzipfly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandes%2Fzipfly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandes%2Fzipfly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandes%2Fzipfly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandes","download_url":"https://codeload.github.com/sandes/zipfly/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandes%2Fzipfly/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31444702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T15:22:31.103Z","status":"ssl_error","status_checked_at":"2026-04-05T15:22:00.205Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["buzon","compression","memory-inflation","python","streaming","zipfile","zipfly"],"created_at":"2024-08-03T01:02:11.731Z","updated_at":"2026-04-05T17:40:10.315Z","avatar_url":"https://github.com/sandes.png","language":"Python","readme":"![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/sandes/zipfly/tests.yml)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/sandes/zipfly)\n[![Downloads](https://static.pepy.tech/badge/zipfly)](https://pepy.tech/project/zipfly)\n\n\n# ZipFly\n\nZipFly is a zip archive generator based on zipfile.py.\nIt was created to generate very large ZIP archives for immediate sending out to clients, or for writing large ZIP archives without memory inflation.\n\n# Requirements\nPython 3.6+ Added \u003ca href=\"https://docs.python.org/3/library/zipfile.html#zipfile-objects\" target=\"blank\"\u003esupport\u003c/a\u003e for writing to unseekable streams.\n\n# Install\n    pip3 install zipfly\n\n# Basic usage, compress on-the-fly during writes\nUsing this library will save you from having to write the Zip to disk. Some data will be buffered by the zipfile deflater, but memory inflation is going to be very constrained. Data will be written to destination by default at regular 32KB intervals.\n\n\n`ZipFly` defaults attributes:\u003cbr\u003e    \n- \u003cb\u003epaths:\u003c/b\u003e [ ] \u003cbr/\u003e\n- \u003cb\u003emode:\u003c/b\u003e (write) w \u003cbr/\u003e\n- \u003cb\u003echunksize:\u003c/b\u003e (bytes) 32768 \u003cbr/\u003e\n- \u003cb\u003ecompression:\u003c/b\u003e Stored \u003cbr/\u003e\n- \u003cb\u003eallowZip64:\u003c/b\u003e True \u003cbr/\u003e\n- \u003cb\u003ecompresslevel:\u003c/b\u003e None \u003cbr/\u003e\n- \u003cb\u003estoresize:\u003c/b\u003e (bytes) 0 \u003cbr/\u003e\n- \u003cb\u003eencode:\u003c/b\u003e utf-8 \u003cbr/\u003e\n\n\u003cbr/\u003e\n\n\n\n`paths` \u003cb\u003elist of dictionaries:\u003c/b\u003e\n\n|                   |.                          \n|----------------   |-------------------------------      \n|**fs**             |Should be the path to a file on the filesystem            \n|**n** *(Optional)* |Is the name which it will have within the archive \u003cbr\u003e (by default, this will be the same as **fs**)\n\n\u003cbr\u003e\n\n```python\n\n    import zipfly\n\n    paths = [\n        {\n            'fs': '/path/to/large/file'\n        },\n    ]\n\n    zfly = zipfly.ZipFly(paths = paths)\n\n    generator = zfly.generator()\n    print (generator)\n    # \u003cgenerator object ZipFly.generator at 0x7f74d52bcc50\u003e\n\n\n    with open(\"large.zip\", \"wb\") as f:\n        for i in generator:\n            f.write(i)\n\n```\n\n\n# Examples\n\n\u003e \u003cb\u003eStreaming multiple files in a zip with \u003ca href=\"https://github.com/sandes/zipfly/blob/master/examples/streaming_django.py\" target=\"_blank\"\u003eDjango\u003c/a\u003e or \u003ca href=\"https://github.com/sandes/zipfly/blob/master/examples/streaming_flask.py\" target=\"_blank\"\u003eFlask\u003c/a\u003e\u003c/b\u003e\nSend forth large files to clients with the most popular frameworks\n\n\u003e \u003cb\u003eCreate paths\u003c/b\u003e\nEasy way to create the array `paths` from a parent folder.\n\n\u003e \u003cb\u003ePredict the size of the zip file before creating it\u003c/b\u003e\nUse the `BufferPredictionSize` to compute the correct size of the resulting archive before creating it.\n\n\u003e \u003cb\u003eStreaming a large file\u003c/b\u003e\nEfficient way to read a single very large binary file in python\n\n\u003e \u003cb\u003eSet a comment\u003c/b\u003e\nYour own comment in the zip file\n\n\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandes%2Fzipfly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandes%2Fzipfly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandes%2Fzipfly/lists"}