Commits

Alan Franzoni committed e978b4b

Enh: far better doc, links, examples.

  • Participants
  • Parent commits bd5fd37

Comments (0)

Files changed (1)

 annopyte
 ========
 Annotations and metadata processing for Python
---------------------
+----------------------------------------------
 
 
 Overview
 ========
 
-This is designed to add and process annotations to python objects, a-la _Java Annotations: http://docs.oracle.com/javase/tutorial/java/javaOO/annotations.html
+This is designed to add and process annotations to python objects, a-la `Java Annotations <http://docs.oracle.com/javase/tutorial/java/javaOO/annotations.html>`_.
 
 Annotations are just metadata, something that is not directly used by code itself but can be queried by other parts of the program.
 
 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 
+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: http://www.python.org/dev/peps/pep-3107/ compatible signature annotation implementation
+Currently contains a `PEP-3107 <http://www.python.org/dev/peps/pep-3107/>`_ compatible signature annotation implementation
 for Python 2.x.
 
 Example code
-=====
+============
 
 Basic function annotation::
 
     ... 
     >>> print myfunc.__annotations__
     {'return': 'return_value_annotation', 'param2': 'fgh', 'param1': 'asd'}
-    >>> 
+    >>>
 
+Prospective code
+================
+
+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.
 
 Homepage
 ========
 http://annopyte.franzoni.eu
 
+Support and discussions
+=======================
+
+pydenji-users@googlegroups.com
+
+https://groups.google.com/d/forum/pydenji-users
+
+Contact me
+==========
+
+Alan Franzoni <username@franzoni.eu>
+