Metadata-Version: 2.4
Name: fastpluggy-example-plugin
Version: 0.2.11
Summary: Example plugin for FastPluggy
Author: FastPluggy Team
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: FastPluggy>=0.4.33
Requires-Dist: loguru
Provides-Extra: tests
Requires-Dist: pytest>=7.0; extra == "tests"
Requires-Dist: pytest-cov>=4.0; extra == "tests"

# Example Plugin for FastPluggy

This is a template plugin that demonstrates the basic structure and capabilities of a FastPluggy plugin. 
Use this as a starting point for your own plugins.

## Structure

```
example_plugin/
├── __init__.py          # Package initialization
├── plugin.py            # Plugin class definition
├── README.md            # This file
└── router/
    └── __init__.py      # API endpoints
```

## Features

This example plugin demonstrates:

1. Basic plugin structure and required attributes
2. Adding API endpoints with FastAPI
3. Creating UI components with the view builder
4. Adding menu items
5. Registering global objects
6. Interacting with other plugins

## How to Use This Template

1. Copy the `example_plugin` directory to your project
2. Rename the directory to your plugin name
3. Update the plugin class in `plugin.py`:
   - Change the class name
   - Update the `module_name`, `module_version`, and other attributes
   - Modify the `on_load_complete` method as needed
4. Update the router in `router/__init__.py`:
   - Modify the existing endpoints or add new ones
   - Update the UI components

## Plugin Class

The plugin class in `plugin.py` inherits from `FastPluggyBaseModule` and defines:

- Required attributes: `module_name`, `module_version`
- UI-related attributes: `module_menu_name`, `module_menu_icon`, `module_menu_type`
- Optional attributes: `module_router`, `extra_js_files`
- Optional dependencies on other plugins
- An `on_load_complete` method for initialization tasks

## API Endpoints

The router in `router/__init__.py` defines several example endpoints:

- `/`: Main index page
- `/feature`: Example feature page
- `/about`: About page

Each endpoint uses the view builder to generate HTML responses with various UI components.

## Next Steps

After customizing this template for your needs, refer to the [Plugin Development Guide](../plugin_development_guide.md) for more advanced features and capabilities.
