My personal library collecting some useful snippets.
Project description
About
This is my personal collection of snippets that I use in multiple projects. Each one feels a bit to small to merit it’s own library.
So what does it include?
memoize decorator (caching)
a storage class wrapping a dict.
unittest assert functions.
Functions for handling large JSON documents.
list_dir(path) –> (dirnames, filenames)
PID file locking
A synchronization decorator
Feedback and getting involved
Send feedback and bug reports by email to hcs at furuvik dot net.
Code Repository: http://gitorious.org/hcs_utils
News
1.3rc3
Release date: 2011-09-06
Storage: Added support for running case_insensitive.
Storage: Added support for default_factory.
1.3rc2
Release date: 2011-08-25
Storage: Minor fixes
daemon: A new module for creating a UNIX daemon.
lock: Added the option to steal a lock.
1.3rc1
Release date: 2011-07-11
PEP8 compliant
Better test coverage
added IDLock class to lock module
Memoize optimization
path.watch_file
1.3a9
Release date: 2011-05-31
Memoize: bugfixes
1.3a8
Release date: 2011-05-17
ItemStore: fixed bugs in rename and move
1.3a7
Release date: 2011-04-26
Memoize: Added support for instance methods
1.3a6
Release date: 2011-04-11
Added timeout to lockfile
1.3a5
Release date: 2011-04-06
Added locking to itemstore
Added a file change watcher
Some bugfixes
PEP8 cleanup
1.3a4
Release date: 2011-02-11
Optimized Store.__contains__
memoized functions can now be recursive
1.3a3
1.3 will only support Python 2.6 and 2.7
Testing using py.test instead of nose
added hcs_utils.path.walkfiles() recursive file generator
hcs_utils.itemstore Kind of on disk object/file/directory store
some smaller functionality
bunch of fixes
1.2.rc5
Release date: 2010-11-30
unittest.eq_json, sorted output so that it can be used with dicts.
unittest switched place on ndiff arguments
1.2.rc4
Release date: 2010-06-15
Dropped support for Python 2.5
Added hcs_utils.collections.ListBuilder, a nice way to manually build lists.
Added hcs_utils.lock.Lock, Interprocess locking using a PID symlink.
Added hcs_utils.path.scan_for_new_files()
Added hcs_utils.path.tempdir context.
Added hcs_utils.storage.Storage.__contains__ and __iter__
Added hcs_utils.storage.json* Storage vs. json helpers
Added hcs_utils.threading.synchronization decorator.
Memoize is now thread safe.
hcs_utils.path.list_dir now returns a namedtuple
1.1
Release date: 2010-04-22
Fixed unpickeling of Storage objects.
1.0
Release date: 2010-04-18
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file hcs_utils-1.3rc3.tar.gz
.
File metadata
- Download URL: hcs_utils-1.3rc3.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e102ebe10dbc5c1c2c9477e3e64d257e293da5b6cc8245bd6cde9f5d497bfae |
|
MD5 | b889ec7be3a6208195849013b941b3b5 |
|
BLAKE2b-256 | 729e69394a0e018e500c809bc98757793093e75d609c12c3c89667c8d2ea202b |