## Summary This PR removes the requirement that all toolkits must have the arcade_ prefix and introduces a more flexible toolkit discovery system using Python entry points. ### 🏷️ Flexible Toolkit Naming * Community toolkits: Only add arcade_ prefix when the user is in arcade-ai/toolkits/ directory and explicitly chooses to create a community contribution. * External toolkits: No prefix requirement - developers can name their toolkits however they want * Toolkit names are now determined by user choice rather than enforced automatically ### 🔍 Entry Point Discovery * Added find_arcade_toolkits_from_entrypoints() method to discover toolkits via entry points * Entry point group: arcade_toolkits with name: toolkit_name * Updated pyproject.toml template to include entry point configuration * Entry point discovery takes precedence over prefix-based discovery for deduplication ### 📦 Backward Compatibility * Existing arcade_* prefixed toolkits continue to work via find_arcade_toolkits_from_prefix() find_all_arcade_toolkits() now combines both discovery methods * Deduplication logic prefers entry point toolkits over prefix-based ones when package names match ### 🛠️ `arcade new` Template Updates * pyproject.toml template for `arcade new` now includes entry point configuration: [project.entry-points.arcade_toolkits] ### 🔧 Minor Improvements * Refactored _strip_arcade_prefix() into a separate method for reusability * Updated variable naming for clarity (community_toolkit → is_community_toolkit) ### Benefits * Developer Freedom: Toolkit developers are no longer forced to use the arcade_ prefix. They are also no longer forced to use the package name as the toolkit name. * Cleaner Naming: External toolkits can use more natural names (e.g., my_company_toolkit instead of arcade_my_company_toolkit) * Better Discovery: Entry points provide a more standard Python mechanism for plugin discovery * Flexible Distribution: Toolkits can be distributed with any package name while still being discoverable ### Testing * Added comprehensive tests for the new entry point functionality * Tests cover edge cases like deduplication, error handling, and backward compatibility ### Version Bumps arcade-core: 2.0.0 → 2.1.0 arcade-ai: 2.0.5 → 2.1.0 This change makes the Arcade toolkit ecosystem more flexible and developer-friendly while maintaining full backward compatibility with existing toolkits. --------- Co-authored-by: Mateo Torres <mateo@arcade.dev> |
||
|---|---|---|
| .. | ||
| arcade_core | ||
| pyproject.toml | ||
| README.md | ||
Arcade Core
Core library for the Arcade platform providing foundational components and utilities.
Overview
Arcade Core provides the essential building blocks for the Arcade platform:
- Tool Catalog & Toolkit Management: Core classes for managing and organizing tools
- Configuration & Schema Handling: Configuration management and validation
- Authentication & Authorization: Auth providers and security utilities
- Error Handling: Comprehensive error types and handling
- Telemetry & Observability: Monitoring and tracing capabilities
- Utilities: Common helper functions and validators
Installation
pip install arcade-core
Usage
- Install an arcade toolkit
pip install arcade-math
- Load the toolkit
import arcade_math
from arcade_core import ToolCatalog, Toolkit
# Create a tool catalog
catalog = ToolCatalog()
# Load a toolkit
toolkit = Toolkit.from_module(arcade_math)
License
MIT License - see LICENSE file for details.