Skip to main content
# Mr. Python
[![Build Status](https://travis-ci.org/petermelias/mrpython.png?branch=master)](https://travis-ci.org/petermelias/mrpython) [![Coverage Status](https://coveralls.io/repos/petermelias/mrpython/badge.png?branch=master)](https://coveralls.io/r/petermelias/mrpython?branch=master) [![Downloads](https://pypip.in/d/mrpython/badge.png)](https://pypi.python.org/pypi/mrpython/) [![Downloads](https://pypip.in/v/mrpython/badge.png)](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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mrpython-0.0.16.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file mrpython-0.0.16.tar.gz.

File metadata

  • Download URL: mrpython-0.0.16.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mrpython-0.0.16.tar.gz
Algorithm Hash digest
SHA256 4cc0bd308c95b7d64c7866e9fd2e3de58ca02b4a4f0cd49b9e4a1c15f790bd8a
MD5 4f627d50d9124947f09733f674181e21
BLAKE2b-256 0842e34ec744d1e4f76c8f17dc1e95759d9df652ee1d7edf2ece3ad9310b3037

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page