Skip to content

Commit

Permalink
dist files v 6-0-4
Browse files Browse the repository at this point in the history
  • Loading branch information
sandes committed Oct 19, 2022
1 parent a52492d commit 2b30c25
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 89 deletions.
Binary file added dist/zipfly-6.0.4.tar.gz
Binary file not shown.
180 changes: 91 additions & 89 deletions zipfly.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,99 +1,12 @@
Metadata-Version: 2.1
Name: zipfly
Version: 6.0.3
Version: 6.0.4
Summary: ZipFly
Home-page: http://github.com/buzonIO/zipfly
Author: Buzon
Author-email: support@buzon.io
License: UNKNOWN
Download-URL: https://github.com/BuzonIO/zipfly/archive/v6.0.3.tar.gz
Description: [![Build Status](https://travis-ci.com/BuzonIO/zipfly.svg?branch=master)](https://travis-ci.com/BuzonIO/zipfly)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/buzonio/zipfly)
[![Downloads](https://pepy.tech/badge/zipfly)](https://pepy.tech/project/zipfly)

# Buzon - ZipFly

ZipFly is a zip archive generator based on zipfile.py.
It was created by Buzon.io to generate very large ZIP archives for immediate sending out to clients, or for writing large ZIP archives without memory inflation.

# Requirements
Python 3.6+

# Install
pip3 install zipfly

# Basic usage, compress on-the-fly during writes
Basic use case is compressing on the fly. Some data will be buffered by the zipfile deflater, but memory inflation is going to be very constrained. Data will be written to destination at fairly regular intervals.

`ZipFly` defaults attributes:<br>
- <b>paths:</b> [ ] <br/>
- <b>mode:</b> (write) w <br/>
- <b>chunksize:</b> (bytes) 16384 <br/>
- <b>compression:</b> Stored <br/>
- <b>allowZip64:</b> True <br/>
- <b>compresslevel:</b> None <br/>
- <b>storesize:</b> (bytes) 0 <br/>


<br/>

`paths` <b>list of dictionaries:</b>

| |.
|---------------- |-------------------------------
|**fs** |Should be the path to a file on the filesystem
|**n** *(Optional)* |Is the name which it will have within the archive <br> (by default, this will be the same as **fs**)

<br>

```python

import zipfly

paths = [
{
'fs': '/path/to/large/file'
},
]

zfly = zipfly.ZipFly( paths = paths )

generator = zfly.generator()
print (generator)
# <generator object ZipFly.generator at 0x7f74d52bcc50>


with open("large.zip", "wb") as f:
for i in generator:
f.write(i)

```
# Examples

> <b>Streaming multiple files in a zip with Django or Flask</b>
Send forth large files to clients with the most popular frameworks

> <b>Create paths</b>
Easy way to create the array `paths` from a parent folder.

> <b>Predict the size of the zip file before creating it</b>
Use the `BufferPredictionSize` to compute the correct size of the resulting archive before creating it.

> <b>Streaming a large file</b>
Efficient way to read a single very large binary file in python

> <b>Set a comment</b>
Your own comment in the zip file


# Maintainer
Santiago Debus <a href="http://santiagodebus.com/" target="_blank">(@santiagodebus.com)</a><br>

<i>Santiago's open-source projects are supported by his Patreon. If you found this project helpful, any monetary contributions to the Patreon are appreciated and will be put to good creative use.</i>

# License
This library was created by Buzon.io and is released under the MIT. Copyright 2020 Grow HQ, Inc.

Download-URL: https://github.com/BuzonIO/zipfly/archive/v6.0.4.tar.gz
Keywords: zipfly,buzon
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Expand All @@ -103,4 +16,93 @@ Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown
License-File: LICENSE

[![Build Status](https://img.shields.io/circleci/build/github/sandes/zipfly/master)](https://app.circleci.com/pipelines/github/sandes/zipfly)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/buzonio/zipfly)
[![Downloads](https://pepy.tech/badge/zipfly)](https://pepy.tech/project/zipfly)

# ZipFly

ZipFly is a zip archive generator based on zipfile.py.
It was created to generate very large ZIP archives for immediate sending out to clients, or for writing large ZIP archives without memory inflation.

# Requirements
Python 3.6+ Added <a href="https://docs.python.org/3/library/zipfile.html#zipfile-objects" target="blank">support</a> for writing to unseekable streams.

# Install
pip3 install zipfly

# Basic usage, compress on-the-fly during writes
Using 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.


`ZipFly` defaults attributes:<br>
- <b>paths:</b> [ ] <br/>
- <b>mode:</b> (write) w <br/>
- <b>chunksize:</b> (bytes) 32768 <br/>
- <b>compression:</b> Stored <br/>
- <b>allowZip64:</b> True <br/>
- <b>compresslevel:</b> None <br/>
- <b>storesize:</b> (bytes) 0 <br/>
- <b>encode:</b> utf-8 <br/>

<br/>



`paths` <b>list of dictionaries:</b>

| |.
|---------------- |-------------------------------
|**fs** |Should be the path to a file on the filesystem
|**n** *(Optional)* |Is the name which it will have within the archive <br> (by default, this will be the same as **fs**)

<br>

```python

import zipfly

paths = [
{
'fs': '/path/to/large/file'
},
]

zfly = zipfly.ZipFly(paths = paths)

generator = zfly.generator()
print (generator)
# <generator object ZipFly.generator at 0x7f74d52bcc50>


with open("large.zip", "wb") as f:
for i in generator:
f.write(i)

```


# Examples

> <b>Streaming multiple files in a zip with <a href="https://github.com/sandes/zipfly/blob/master/examples/streaming_django.py" target="_blank">Django</a> or <a href="https://github.com/sandes/zipfly/blob/master/examples/streaming_flask.py" target="_blank">Flask</a></b>
Send forth large files to clients with the most popular frameworks

> <b>Create paths</b>
Easy way to create the array `paths` from a parent folder.

> <b>Predict the size of the zip file before creating it</b>
Use the `BufferPredictionSize` to compute the correct size of the resulting archive before creating it.

> <b>Streaming a large file</b>
Efficient way to read a single very large binary file in python

> <b>Set a comment</b>
Your own comment in the zip file




2 changes: 2 additions & 0 deletions zipfly.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
LICENSE
MANIFEST.in
README.md
setup.cfg
setup.py
Expand Down

0 comments on commit 2b30c25

Please sign in to comment.