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

Overview

This is designed to add and process annotations to python objects, a-la Java Annotations.

Annotations are just metadata, something that is not directly used by code itself but can be queried by other parts of the program.

Python itself doesn’t need special low-level implementations in order to support metadata, this library’s target is just to provide a standard way of setting and querying metadata from python objects.

Python 3 actually contains a basic version of metadata, but it’s limited to the arguments and return values of functions; this library is designed to extend such support to other objects, so you can annotate a class, a function or any object with any kind of data.

Current status

Currently contains a PEP-3107 compatible signature annotation implementation for Python 2.x.

Example code

Basic function annotation:

>>> from annopyte.annotations.signature import annotate_f
>>> @annotate_f("return_value_annotation", param1="asd", param2="fgh")
... def myfunc(param1, param2=None):
...     pass
...
>>> print myfunc.__annotations__
{'return': 'return_value_annotation', 'param2': 'fgh', 'param1': 'asd'}
>>>

Prospective code ( to be done )

That’s the basic idea I’d like to implement for metadata usage:

class Author(Annotation)
    name = "default"

@Author(name="John Doe")
class MyClass(object):
    pass

>>> query_for_metadata("mypackage", Author, name="John Doe")
[<class 'mypackage.subpackage.MyClass'>]
>>>

That’s it.

Contact me

Alan Franzoni <username at franzoni.eu> (please note: write LITERALLY username in the email address!)

Release History

Release History

0.3.1

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

0.2.1

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

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
annopyte-0.3.1.zip (8.6 kB) Copy SHA256 Checksum SHA256 Source Jan 24, 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