Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Working on a new getting started section and general doc improvments.

  • Loading branch information...
1 parent 64bc52c commit cb6c5c749c9af278371f9168e7db5cdc63e0f91f @ironfroggy committed
Showing with 24 additions and 4 deletions.
  1. +24 −4 docs/index.rst
28 docs/index.rst
@@ -59,11 +59,31 @@ release some components as optional additions to your core package.
Getting Started
-The easiest way to get started is to start loading existing modules or
-classes with the ``straight.plugin`` loaders, which creates points where
-your project can be extended by injecting new modules into that namespace.
+After installing ``straight.plugin`` with ``pip install straight.plugin``,
+you'll want to decide on a :term:`namespace` within your package where you'll
+keep your own plugins and where other developers can add more plugins for
+your package to use.
-Read the :doc:`loaders` documentation to get started.
+For example, if you're writing a log filtering library named ``logfilter`` you may
+choose ``logfilter.plugins`` as a package to hold your plugins, so you'll create
+the empty package as you would any other python package. However, the only
+contents of ``logfilter/plugins/`` will be a little bit of special
+code telling python this is a :term:`namespace package`.
+ from pkgutil import extend_path
+ __path__ = extend_path(__path__, __name__)
+Now, any modules you place in this package are plugin modules able to be loaded
+by ``straight.plugin``.
+ from straight.plugin import load
+ plugins = load("logfilter.plugins")
Indices and tables

0 comments on commit cb6c5c7

Please sign in to comment.
Something went wrong with that request. Please try again.