This release is a pre-release and may not be stable for production use.
Rafutils
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.
Metadata
Release files for rafutils 0.1.2-dev
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rafutils-0.1.2-dev.tar.gz | 5.7 kB | Without provenance | Details for rafutils-0.1.2-dev.tar.gz |
Release files / rafutils-0.1.2-dev.tar.gz
| Download URL | rafutils-0.1.2-dev.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f037c90fc716b710ddc18b2ad0e3ba58aacf0266b66818ecb024ec91fb7d006
|
|
BLAKE2b-256 checksum How to use checksums |
f9bd055bcfea7a7943c3b0dbba95075bf2dc7f80eb529ef22b2b67b69fa728bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for rafutils 0.1.2-dev
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.