This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A few helpful utilities that I find useful.

Autovivification

Dictionary type that allows for dynamic allocation of nested key values without prior defintion.

>>> a = AutoVivification()
>>> a[1][2] = 3

Multiprocessing Wrapper

This module provides a set of methods for handling multi-threading patterns more easily.

>>> import user_metrics.utils.multiprocessing_wrapper as mpw
>>> mpw.build_thread_pool(['one','two'],len,2,[])
[2,2]

Record Type

Defines the recordtype method which returns a type definition object that allows for the creation of mutable objects with specified attributes. These are essentially identical to collections.namedtuple except that the attributes may be changed after the namedtuple objects are created.

>>> Point = recordtype('Point', 'x y', default=0)
>>> Point()                 # instantiate with defaults
Point(x=0, y=0)

Miscellaneous

Some miscellaneous methods exposed by this package.

Format Timestamp

The format_timestamp method takes a timestamp representation (string or datetime) and convert to a standard string representation.

Enumeration

The enum method implements an enumeration:

>>> Numbers = enum('ZERO', 'ONE', 'TWO')
>>> Numbers.ZERO
0
>>> Numbers.ONE
1

Build Named Tuple

Given a set of types, values, and names builds a named tuple. This method expects three lists all of the same length and returns a dynamically built namedtuple object. Currently, only list, str, int, and float cast methods are accepted as members of types. The mothod is named build_namedtuple.

Unpack Fields

Unpacks the attributes and values of a record type or named tuple into an ordered dictionary.

Release History

Release History

0.1.2-dev

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1-dev

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
rafutils-0.1.2-dev.tar.gz (5.7 kB) Copy SHA256 Checksum SHA256 Source Mar 6, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting