fast_package_file
Package a directory to a file, with fast file access and compression support
import fast_package_file
# Package a directory into a file
fast_package_file.build('a_directory', 'a_package.file')
# Prepare a package file
data_package = fast_package_file.PackagedDataFile('a_package.file')
# Load a file from the packed directory and save it
with open('any.file', 'wb') as any_file:
data_package.load_file('path\\to\\any.file')
# Or just get the raw binary data
from PIL import Image
i = Image.open(io.BytesIO(data_package.load_file('image.png')))
# Some other useful functions
data_package.load_bulk(prefix='audio\\sfx\\', postfix='.wav')
fast_package_file.oneshot('a_package.file', 'path\\to\\any.file')
fast_package_file.oneshot_bulk('a_package.file', prefix='audio\\sfx\\', postfix='.wav')
Installation
From PyPI:
pip install fast-package-file
Or from Github:
pip install git+git://github.com/Kataiser/fast-package-file.git@master#egg=fast_package_file
Documentation
More details will be available at https://fast-package-file.readthedocs.io/en/latest/
Features
- Is fast because only the data needed is loaded from the package file, total package size is irrelevant
- Obfuscates files from (most) users
- Like a .zip file, but doesn't decompress the entire thing when reading just one file
- Includes the entire directory and subdirectories, not just surface-level files
- Files are compressed with Gzip, but only if compression improves file size (per file) and is enabled (per package file)
- Pretty good error handling when loading package files, just catch fast_package_file.PackageDataError
- Inspired by video game packaging, such as UE4's .pak or GTA V's .rpf formats
- Cross-platform, has CI for Linux, MacOS, and Windows
Contribute
- Issue Tracker: https://github.com/Kataiser/fast-package-file/issues
- Source Code: https://github.com/Kataiser/fast-package-file
License
The project is licensed under the MIT license.
Metadata
Release files for fast-package-file 1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fast_package_file-1.1.tar.gz | 5.9 kB | Without provenance | Details for fast_package_file-1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fast_package_file-1.1-py3-none-any.whl | Python 3 | none | any | Details for fast_package_file-1.1-py3-none-any.whl |
Total release size: 13.0 kB
Release files / fast_package_file-1.1.tar.gz
| Download URL | fast_package_file-1.1.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46bea46f9c363d4435c5b88d14cad39fdc10dfdc29be28bbd744702ee77519ca
|
|
BLAKE2b-256 checksum How to use checksums |
b44f67cf6f6f0aed8682581ffe646bbb2c8ba358ae9b962f971fe273dd8b3f85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Release files / fast_package_file-1.1-py3-none-any.whl
| Download URL | fast_package_file-1.1-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a5c4860efdffe9f84030c73170d6440dd2c8ff283ef3d836ff24e387c9641bcd
|
|
BLAKE2b-256 checksum How to use checksums |
c772af75c71905c88a34a787186226191aed183f1ae12431221b758799625a2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Security for fast-package-file 1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.