Fast Disk Image for HPC
Project description
bcachefs
C implementation with Python 3.7+ bindings for Bcachefs
import bcachefs as bch
# Using a filesystem-like API
with bch.mount("disk.img") as bchfs:
for root, dirs, files in bchfs.walk():
print(f"Directories in {root}: {[str(d) for d in dirs]}")
for ent in files:
with image.open(ent, "rb") as f:
for line in f.lines():
print(line)
# Using a cursor with entries cache
with bch.mount("disk.img").cd() as cursor:
for root, dirs, files in cursor.walk():
print(f"Directories in {root}: {[str(d) for d in dirs]}")
for ent in files:
with image.open(ent, "rb") as f:
for line in f.lines():
print(line)
# Using a ZipFile-like API
with Bcachefs("disk.img", "r") as image:
file_names = image.namelist()
for filename in file_names:
with image.open(filename, "rb") as f:
for line in f.lines():
print(line)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bcachefs-0.0.0.tar.gz
(21.8 kB
view hashes)
Built Distribution
Close
Hashes for bcachefs-0.0.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cbdfff0e952f2f082a681c419a64962835fb0d779b3135ae9394b62b3cda247 |
|
MD5 | 5d148a5069bf1cc5dca277b76a488aa9 |
|
BLAKE2b-256 | e5913c9ba861a20d16b2365ab853465f5ca9db3e70bdb042ef7f58528905b850 |