# Mr. Python
[](https://travis-ci.org/petermelias/mrpython) [](https://coveralls.io/r/petermelias/mrpython?branch=master) [](https://pypi.python.org/pypi/mrpython/) [](https://pypi.python.org/pypi/mrpython/)
A collection of functions, decorators and data that don't seem to fit into any of my (or anybody else's) libraries.
## Functions
* ``` autolog(message, level=logging.DEBUG) ```
* ``` enum(**enums) ```
* ``` ip2long(ip) ```
* ``` long2ip(long) ```
* ``` to_dict(o, limit=None) ```
* ``` walker(node, limit=None) ```
## Data
* STATES (dict)
* ORDERED_STATES (OrderedDict)
## Interfaces
* TInterface (only for use with walker)
### Instructions for using walker
1. Inherit your walkable nodes from ``` mrpython.TInterface ```
2. Set the ``` _dict_attrs attribute on all of your nodes to limit the extent to which they walk
3. Pass one of the nodes to ``` walker(node) ```
4. Store the resulting dictionary.
If you want to override the ``` _dict_attrs ``` default limiting, call the ``` to_dict ``` method on your starting node and supply the ``` limit ``` parameter and then pass the resulting dictionary to the ``` walker(node) ``` function.
[](https://travis-ci.org/petermelias/mrpython) [](https://coveralls.io/r/petermelias/mrpython?branch=master) [](https://pypi.python.org/pypi/mrpython/) [](https://pypi.python.org/pypi/mrpython/)
A collection of functions, decorators and data that don't seem to fit into any of my (or anybody else's) libraries.
## Functions
* ``` autolog(message, level=logging.DEBUG) ```
* ``` enum(**enums) ```
* ``` ip2long(ip) ```
* ``` long2ip(long) ```
* ``` to_dict(o, limit=None) ```
* ``` walker(node, limit=None) ```
## Data
* STATES (dict)
* ORDERED_STATES (OrderedDict)
## Interfaces
* TInterface (only for use with walker)
### Instructions for using walker
1. Inherit your walkable nodes from ``` mrpython.TInterface ```
2. Set the ``` _dict_attrs attribute on all of your nodes to limit the extent to which they walk
3. Pass one of the nodes to ``` walker(node) ```
4. Store the resulting dictionary.
If you want to override the ``` _dict_attrs ``` default limiting, call the ``` to_dict ``` method on your starting node and supply the ``` limit ``` parameter and then pass the resulting dictionary to the ``` walker(node) ``` function.
Metadata
Release files for mrpython 0.0.18
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mrpython-0.0.18.tar.gz | 4.5 kB | Details |
Release files / mrpython-0.0.18.tar.gz
| Download URL | mrpython-0.0.18.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e610acefccbede8a4379c484382597eb6cf5cc53cc967ba569df40b0a7ecc713
|
|
BLAKE2b-256 checksum How to use checksums |
adf2d0f5dfd5e5019eae5ff5c7b0da33d6e5403d3b5093c160e69ed76dc160e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |