Skip to content

Commit

Permalink
Add RST README for PyPi
Browse files Browse the repository at this point in the history
  • Loading branch information
gmjosack committed Oct 11, 2013
1 parent 9a539c9 commit 2d09534
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
6 changes: 6 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

Unfortunately I prefer Docs in Github's Extended Markdown but PyPi
only supports RST. After making changes to README.md you should run
the following to keep the README on PyPi up to date.

pandoc --from=markdown --to=rst --output=README README.md
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include LICENSE
include README.md
include README
50 changes: 50 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
annex
=====

Summary
~~~~~~~

Annex provides assistance with developing plugin-based tools.

With Annex you can load and reload plugins from various python modules
without the requirement that they exist on the PYTHONPATH.

Example Usage
~~~~~~~~~~~~~

In your project you would define a base class from which all plugins for
project would subclass.

base\_plugin.py
'''''''''''''''

::

class BaseTestPlugin(object):
def run(self, *args, **kwargs):
raise NotImplementedError()

example\_plugin.py
''''''''''''''''''

::

from base_plugin import BaseTestPlugin

class PrinterPlugin(BaseTestPlugin):
def run(self, *args, **kwargs):
print args, kwargs

foo.py
''''''

::

from base_plugin import BaseTestPlugin
from annex import Annex

plugins = Annex(BaseTestPlugin, "/path/to/plugins")

for plugin in plugins:
plugin.run("foo", bar="baz")

0 comments on commit 2d09534

Please sign in to comment.