FastSkill provides multiple API interfaces to accommodate different integration needs and programming languages. All APIs provide access to the same core functionality with consistent behavior and data formats.
The FastSkill API follows REST principles and provides both synchronous and asynchronous interfaces across all supported languages.
The primary interface for Python applications, providing both synchronous and asynchronous methods with full type hints and comprehensive error handling.
Copy
import asynciofrom fastskill import FastSkillService, ServiceConfigasync def python_sdk_example(): # Create service with configuration config = ServiceConfig( skill_storage_path="./skills", execution_timeout=30, enable_hot_reload=True ) # Initialize service service = FastSkillService(config) await service.initialize() # Use the API skills = await service.list_skills() print(f"Found {len(skills)} skills") await service.shutdown()asyncio.run(python_sdk_example())
# Check API versioncurl -X GET http://localhost:8080/api/version \ -H "Content-Type: application/json"
2
Review changes
Copy
# Get changelog for version differencescurl -X GET http://localhost:8080/api/changelog?from=v1&to=v2 \ -H "Content-Type: application/json"
3
Update client code
Copy
# Update to new API versionimport fastskill# Old way (deprecated)service = fastskill.FastSkillService()# New way (v2)from fastskill import ServiceConfigconfig = ServiceConfig(api_version="v2")service = fastskill.FastSkillService(config)
# Test API endpointsimport requestsdef test_rest_api(): base_url = "http://localhost:8080" # Test health endpoint response = requests.get(f"{base_url}/health") assert response.status_code == 200 # Test skills endpoint response = requests.get(f"{base_url}/api/skills") assert response.status_code == 200 data = response.json() assert "success" in data assert "data" in data
# Instead of getting all skills at onceall_skills = await service.list_skills() # ❌ May be slow# Use paginationpage = 1all_skills = []while True: result = await service.list_skills(page=page, page_size=50) skills = result['data'] all_skills.extend(skills) if len(skills) < 50: # Last page break page += 1
2
Cache frequently accessed data
Copy
# Cache skill metadatacached_skills = Noneasync def get_cached_skills(): global cached_skills if cached_skills is None: cached_skills = await service.list_skills() return cached_skills
The FastSkill API is designed to be intuitive and consistent across all interfaces. Start with the Python SDK for the best development experience, then expand to REST API for production deployments.