weppy extensions extend the functionality of weppy in various different ways.
Extensions are listed on the Extension Registry and can be downloaded with
pip. When adding extensions to your application, it is a
good habit to declare them as dependencies in your requirements.txt or setup.py
file: this way, they can be installed with a simple command or when your application installs.
An extension typically has accompanying documentation that shows how to use it
correctly. In general, weppy extensions should be named with the format
and have a package-name like
weppy_foo, replacing foo with the desired name.
If the extension is written according to the suggested pattern, using it in your
application will be quite easy:
from weppy import App from weppy_foo import Foo app = App(__name__) # configure the extension app.config.Foo.someparam = "something" # add the extension to our app app.use_extension(Foo) # access extension attributes and methods app.ext.Foo.bar()
As you can see, extensions have a namespace that accesses your app's configuration,
and after you have added the extension to your application using the
method, you can access the extension instance at
section under development