Skip to main content

filevault

filevault is a class for managing a hash directory tree of files on a filesystem.

A Vault will:

  • Create a hash directory tree of custom depth

  • Spread out files to keep CLI snappy when traversing the tree

  • Scale to hundreds of thousands of files

  • Obfuscate directory paths and filenames

how to install

Setuptools:

easy_install filevault

Pip:

pip install filevault

how to use

How to create a default Vault object:

from filevault import Vault

v = Vault()

You may (and should) customize the Vault instance. Here are the arguments:

vaultpath

Where should the tree be created? Defaults to ‘vault’ in pwd.

depth

How deep should the tree span? Defaults to 3 directories deep.

salt

Add a custom salt for a unique and more secure tree, defaults to ‘changeme’

Another custom example:

from filevault import Vault

v = Vault( vaultpath="/tmp/for-test", depth=2, salt="sugar" )

Now that we have a Vault object named v, we may review its two methods:

create_filename( seed, ext=’’, absolute=False )

Create a valid vault filename seeded with input. Optional extension. Relative path from vaultpath by default unless absolute is True.

create_random_filename( ext=’’, absolute=False )

Create a valid vault filename seeded with random input. Optional extension. Relative path from vaultpath by default unless absolute is True.

Here is a full example:

# import Vault class
from filevault import Vault

# create vault object named v, with custom path, depth, and salt
v = Vault( vaultpath="/tmp/for-test", depth=2, salt="sugar" )

# print a valid vault filename with extension
print v.create_filename( "my-first-file", ".png" )

# result:
# 3/9/3993817d4f9b3867c6db29b23c9d2ff9bb8a87d89426002adbb6ed34289d9e32.png

print v.create_filename( "my-first-file", ".png" )

# Same result:
# 3/9/3993817d4f9b3867c6db29b23c9d2ff9bb8a87d89426002adbb6ed34289d9e32.png

# print a valid vault absolute filename with extension
print v.create_filename( "my-first-file", ".png", absolute=True )

# result:
# /tmp/for-test/3/9/3993817d4f9b3867c6db29b23c9d2ff9bb8a87d89426002adbb6ed34289d9e32.png


# print a random valid vault filename without extension
v.create_random_filename()

# result:
# 6/1/6169d6ee0ac0bc63ab667fb94d9cc747df0c03596ac43e24a51b3517d74bdc42

how may I thank you?

Check out my webpage to screenshot service and give me some feedback, tips, or advice. Every little bit of help counts.

Release files for filevault 0.1.2

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

Source distribution (sdist)

Source distribution for filevault 0.1.2
File Size Uploaded
filevault-0.1.2.tar.gz 2.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for filevault 0.1.2
File Interpreter ABI Platform
filevault-0.1.2-py2.7.egg Legacy Egg format - - Details

Total release size: 6.7 kB

Release files / filevault-0.1.2.tar.gz

Download URL filevault-0.1.2.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bf2cacd23c585f9587e3df242e8ae77a2c7e481fecffea31a529a834ff5bddcd
BLAKE2b-256 checksum
How to use checksums
b7bae6fcb84b66d11564c1f254f04b217f5a9a42c5698cf7c8a3c79283e9af21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / filevault-0.1.2-py2.7.egg

Download URL filevault-0.1.2-py2.7.egg
Size 3.9 kB
Tags Egg
SHA-256 checksum
How to use checksums
a832efc66bd8087003ee685de5cac751ca5eda326860f8b6b19792e5e9511bfa
BLAKE2b-256 checksum
How to use checksums
82d526981382001bc5ee7f8cc24a15d6f5443e519629991c4b2ebc9a91350d15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

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