fs.archive 
Requirements
| PyFilesystem2 | |||
|---|---|---|---|
| six |
fs.archive supports all Python versions supported by PyFilesystem2:
Python 2.7, and Python 3.5 onwards. Code should still be compatible with
Python 3.4, but is not tested anymore.
Installation
Install directly from PyPI, using pip:
$ pip install fs.archive
Additional features
fs.archive also provides the following
extras, allowing you to read from more archive formats:
- tar.xz: support for
xzcompressed tar files. Requires the additionalbackports.lzmamodule in Python 2, but is available natively in Python 3. - iso: pure-python reading/writing ISO disk images (with support for ISO
9660 Levels 1, 2 and 3, Joliet and Rock Ridge extensions). Requires
the
pycdliblibrary. - 7z: support for 7z archives. Requires the
py7zrandiocursorlibraries. - all: install all of the above.
Usage
Opener
The fs.archive.open_archive function is the easiest way to open an
archive filesystem, with an archive located on any other filesystem,
directly determining the class to use from the file extension:
>>> from fs import open_fs
>>> from fs.archive import open_archive
>>> my_fs = open_fs(u'temp://')
>>> with open_archive(my_fs, u'test.zip') as archive:
... type(archive)
<class 'fs.archive.zipfs.ZipFS'>
Constructors
All the filesystems implemented in fs.archive also support reading
from (and if not read-only, writing to) a file handle:
>>> import fs.archive.tarfs
>>> with fs.open_fs(u'mem://') as mem:
... with fs.archive.tarfs.TarFS(mem.openbin(u'test.tar', 'w')) as tar:
... tar.setbytes(u'hello', b'Hello, World!')
... with fs.archive.tarfs.TarFS(mem.openbin(u'test.tar', 'r+')) as tar:
... tar.isfile(u'hello')
True
Feedback
Found a bug ? Have an enhancement request ? Head over to the GitHub issue tracker of the project if you need to report or ask something. If you are filling in on a bug, please include as much information as you can about the issue, and try to recreate the same bug in a simple, easily reproductible situation.
Credits
fs.sshfs is developed and maintained by:
The following people contributed to fs.archive:
This project obviously owes a lot to the PyFilesystem2 project and all its contributors.
See also
Release files for fs.archive 0.7.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fs.archive-0.7.3.tar.gz | 29.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fs.archive-0.7.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 61.7 kB
Release files / fs.archive-0.7.3.tar.gz
| Download URL | fs.archive-0.7.3.tar.gz |
|---|---|
| Size | 29.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
102ed42d4e7f40d8053b085e6f1eb9153db6754adea08c44cb1c6e930c95bd92
|
|
BLAKE2b-256 checksum How to use checksums |
503bef1f746aff54acdd190cbfa40921bfb59aa510597f0dcd6ff0705da00a15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11
|
Release files / fs.archive-0.7.3-py2.py3-none-any.whl
| Download URL | fs.archive-0.7.3-py2.py3-none-any.whl |
|---|---|
| Size | 32.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a9826f9d4aec176558677552e022625266f5c372dfd6135fa786d2ed3e714ef3
|
|
BLAKE2b-256 checksum How to use checksums |
5c30e805da1468195a0d50121d1ff2735a87e6192c1f70869ceead21a86b37e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11
|