May I suggest an extended,
CRUD style,
plugin_name oriented
interface, in a 'plugin' module? So we can use
plugin.pack(your_app, w2p_filepath, plugin_name)
to pack the given plugin into a w2p file at w2p_filepath;
even better if w2p_filepath unambiguously define the plugin_name, so
we can use simply:
plugin.pack(your_app, w2p_filepath)
or (best):
plugin.pack(your_app, plugin_name)
'C' in CRUD:
plugin.create(your_app, w2p_filepath)
to install (==unpack, ==create) the given plugin;
or (better):
plugin.create(your_app, plugin_name)
'R' in CRUD:
plugin.retrieve(your_app, w2p_filepath)
to query (in a dictionary) infos about the given plugin;
or (better):
plugin.retrieve(your_app, plugin_name)
and
plugin.retrieve_all(your_app)
'U' in CRUD:
plugin.update(your_app, w2p_filepath)
to install a new version of the given plugin, if exist(plugin) and
exist(new_version_of_plugin);
or (better):
plugin.update(your_app, plugin_name)
and
plugin.update_all(your_app)
to update all plugins;
'D' in CRUD:
plugin.delete(your_app, w2p_filepath)
to remove the given plugin;
or (better):
plugin.delete(your_app, plugin_name)
and
plugin.delete_all(your_app)
to delete all plugins.
Some upper/admin level functions:
plugin.list_all(your_app)
to query the list of names of all plugins installed;
plugin.dependency_check(your_app, plugin_name)
to check (known) dependencies of given plugin and return infos in a
dictionary;
even if plugin not installed yet (so we can programmatically check
preconditions of that installation)
plugin.dependency_check_all(your_app)
to check all (known) dependencies and return infos in a dictionary.
Finally a
CRUD style,
plugin_name oriented
interface for a plugin repository, without short descriptions:
plugin.repository_create(repository, plugin_name)
to create given plugin in that repo;
plugin.repository_retrieve(repository, plugin_name)
to query (in a dictionary) infos about the given plugin;
plugin.repository_retrieve_all(repository)
to query (in a dictionary) infos about the given plugin;
plugin.repository_list(repository)
to query the list of names of all plugins in that repo;
plugin.repository_update(repository, plugin_name)
to update given plugin;
plugin.repository_delete(repository, plugin_name)
to delete given plugin;
plugin.repository_delete_all(repository)
to delete all plugins.
Repositories can be
local (given by w2p_filepath),
or
global (given by URI and authentication dataset).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---