Skip to main content

multivolumefile

https://coveralls.io/repos/github/miurahr/multivolume/badge.svg?branch=master https://github.com/miurahr/multivolume/workflows/Run%20Tox%20tests/badge.svg

MultiVolumefile is a python library to provide a file-object wrapping multiple files as virtually like as a single file. It inherit io.RawIOBase class and support some of its standard methods.

See API details at python library reference

Status

multivolumefile module is under active development and considered as *Alpha* state. It is not good idea to use it on production systems, but it may work well in a limited range of usage. Please check limitations and passed test cases.

Install

You can install it as usual public libraries, you can use pip command

` pip install multivolumefile `

You are also able to add it to your setup.py/cfg as dependency.

Usages

  • For reading multi-volume files, that has names archive.7z.0001, archive.7z.0002 and so on, you can call multivolumefile as follows;

with multivolumefile.open('archive.7z', 'rb') as vol:
    data = vol.read(100)
    vol.seek(500)
  • For writing multi-volue files, that has names archive.7z.0001, archive.7z.0002 and so on, you can call multivolumefile as follows;

data = b'abcdefg'
with multivolumefile.open('archive.7z', 'wb') as vol:
    size = vol.write(data)
    vol.seek(0)

you will see file archive.7z.001 are written.

Limitations and known issues

  • fileno() is not supported and when call it, you will get RuntimeError exception.

  • There are several non-implemented functions such as truncate() and writeline() that will raise NotimplementedError

  • There are several non-implemented functions such as readlines(), readline() and readall().

  • Text mode is not implemented.

  • *Caution*: When globbing existent volumes, it glob all files other than 4-digit extensions, it may break your data.

Contribution

You are welcome to contribute the project, as usual on github projects, Pull-Requests are always welcome.

License

Multivolume is licensed under GNU Lesser General Public license version 2.1 or later.

ChangeLog

All notable changes to this project will be documented in this file.

Unreleased

Added

Changed

Fixed

Deprecated

Removed

Security

v0.2.3

Added

  • implement readall()

Chnaged

  • lint with black

v0.2.2

Added

  • Add py.typed file for type hinting.

v0.2.1

Added

  • Add name property that indicate basename of volumes

  • Add stat() that return stat_result which has as mostly same methods as os.stat_result class except for platform dependent methods.

v0.2.0

Added

  • Type hint information bundled.

Fixed

  • Seek() returns current position.

Changed

  • Explanation of unsupported methods an modes in README

v0.1.4

Fixed

  • Fix append mode bug.

v0.1.3

Fixed

  • Fix added volume size become wrong

v0.1.2

Fixed

  • Fix append mode (#1)

v0.1.1

Fixed

  • Fin NotImplementedError when writing boudning of target files

v0.1.0

  • *API changed*

Added

  • Add mode ‘x’, ‘xb’ and ‘xt’

  • Add mode ‘a’, ‘ab’ and ‘at’

  • Support flush()

Changed

  • Change API: file argument of ‘r’ and ‘rb’ now single basename instead of list of files

v0.0.5

  • Support context manager

  • Support read functions.

Metadata

Release files for multivolumefile 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for multivolumefile 0.2.3
File Size Uploaded
multivolumefile-0.2.3.tar.gz 78.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for multivolumefile 0.2.3
File Interpreter ABI Platform
multivolumefile-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 95.0 kB

Release files / multivolumefile-0.2.3.tar.gz

Download URL multivolumefile-0.2.3.tar.gz
Size 78.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a0648d0aafbc96e59198d5c17e9acad7eb531abea51035d08ce8060dcad709d6
BLAKE2b-256 checksum
How to use checksums
50f0a7786212b5a4cb9ba05ae84a2bbd11d1d0279523aea0424b6d981d652a14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release files / multivolumefile-0.2.3-py3-none-any.whl

Download URL multivolumefile-0.2.3-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
237f4353b60af1703087cf7725755a1f6fcaeeea48421e1896940cd1c920d678
BLAKE2b-256 checksum
How to use checksums
2231ec5f46fd4c83185b806aa9c736e228cb780f13990a9cf4da0beb70025fcc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.5

2 release files

0.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page