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
# Metadata for Functions
Python decorator function to track metadata on function calls

# Example
```python
@meta_func(ignore_errors=True)
def self_mult(n):
sleep(0.2)
return n*n

print(self_mult(10)) # => 100
print(self_mult.log_info()) # => {'time_started': 1422042033.971449, 'warnings': None, 'args': (10,), 'error_info': None, 'time_ended': 1422042034.171857, 'time_elapsed': 0.200408, 'return_value': 100, 'kwargs': None}

print(self_mult(15)) # => 225
print(self_mult.log_info()) # => {'time_started': 1422042034.172171, 'warnings': None, 'args': (15,), 'error_info': None, 'time_ended': 1422042034.373299, 'time_elapsed': 0.201128, 'return_value': 225, 'kwargs': None}

print(self_mult("foo")) # => None
print(self_mult.log_info()) # => {'time_started': 1422042034.373651, 'warnings': None, 'args': ('foo',), 'error_info': (<type 'exceptions.typeerror'="">, TypeError("can't multiply sequence by non-int of type 'str'",), <traceback object="" at="" 0x10fcea098="">), 'time_ended': 1422042034.574758, 'time_elapsed': 0.201107, 'return_value': None, 'kwargs': None}
```

# Usage
Decorate a function with `@meta_func()` passing the optional keyword argument ignore_errors = True/False. ignore_errors tells `@meta_func` whether or not to raise any exception your decorated function raises or to solely log to the error_info attribute.

# Compatibility
Tested compatible with Py2.7 and Py3, but this code is provided as is with no warranty or guarantee, implied or explicit.

# More Information
Please see my blog post here: http://garrens.com/blog/2015/01/23/metadata-for-functions-python-decorator/
Release History

Release History

0.1.3

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.0

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
meta_func-0.1.3.tar.gz (2.4 kB) Copy SHA256 Checksum SHA256 Source Mar 9, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS 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