New Project: hashfs

I've started a new Python project: hashfs

HashFS is

A content-addressable file management system for Python

The major features of HashFS are

  • Files are stored once and never duplicated.
  • Uses an efficient folder structure optimized for a large number of files. File paths are based on the content hash and are nested based on the first n number of characters.
  • Can save files from local file paths or readable objects (open file handlers, IO buffers, etc).
  • Able to repair the root folder by reindexing all files. Useful if the hashing algorithm or folder structure options change or to initialize existing files.
  • Supports any hashing algorithm available via hashlib.new.
  • Python 2.7+/3.3+ compatible.

Read more…


verify: Release v1.0.0

Verify v1.0.0 has been released.

It was the first major release which now solidifies the public API. There were several breaking changes along the way but iteration was much quicker than some of my other projects (1 week from v0.0.0 to v1.0.0).

There are currently 71 validation methods and two styles of assertion runners: positional arguments and method chaining. There are no immediate plans to add additional validators but feature requests are welcome.

Read more…


New Project: verify

I've started a new Python project: verify

Verify is billed as

A painless assertion and validation library for Python

Why make this when similar libraries already exist? Simply, I wanted a library with the following features:

Read more…


Reinitializing Chained Method Values in Python

This is part four in my series on Generative Classes.

In part three of this series, Late Value Passing for Lazy Method Chaining in Python, I covered a methodology for creating reusable, ad-hoc functions from chained methods by passing the initial chain value late (i.e. after the method chain had been built up). In this post I will outline a way to replace the initial chain value by returning a clone of the method chains reinitialized with the replacement value.

The example code I will use to discuss this type of functionality can be found in pydash's chaining submodule:

Read more…