Complete package renaming and platform migration: Package Name Changes: - Rename package from 'wikijs-python-sdk' to 'py-wikijs' - Update setup.py package name - Update pyproject.toml package name - Users can now install with: pip install py-wikijs URL Migration (Gitea → GitHub): - Replace all Gitea URLs with GitHub URLs - Update repository: github.com/l3ocho/py-wikijs - Update issue tracker: github.com/l3ocho/py-wikijs/issues - Update documentation links - Fix URL path format (/src/branch/main/ → /blob/main/) Documentation Updates: - Update README.md badges (PyPI, GitHub) - Update installation instructions (pip install py-wikijs) - Update all doc references to new package name - Update all examples with GitHub URLs - Update DEPLOYMENT_READY.md with new package name - Update deployment.md with new package name Testing: - Successfully built py_wikijs-0.1.0.tar.gz (138 KB) - Successfully built py_wikijs-0.1.0-py3-none-any.whl (66 KB) - Package installs correctly: pip install py-wikijs - Imports work: from wikijs import WikiJSClient - Package metadata correct (Home-page: github.com/l3ocho/py-wikijs) Breaking Changes: - Package name changed from wikijs-python-sdk to py-wikijs - Repository migrated from Gitea to GitHub - All URLs updated to GitHub Users should now: pip install py-wikijs # Instead of wikijs-python-sdk 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
95 lines
2.3 KiB
Python
95 lines
2.3 KiB
Python
"""Wiki.js Python SDK - Professional SDK for Wiki.js API integration.
|
|
|
|
This package provides a comprehensive Python SDK for interacting with Wiki.js
|
|
instances, including support for pages, users, groups, and system management.
|
|
|
|
Example:
|
|
Synchronous usage:
|
|
|
|
>>> from wikijs import WikiJSClient
|
|
>>> client = WikiJSClient('https://wiki.example.com', auth='your-api-key')
|
|
>>> pages = client.pages.list()
|
|
|
|
Asynchronous usage (requires aiohttp):
|
|
|
|
>>> from wikijs.aio import AsyncWikiJSClient
|
|
>>> async with AsyncWikiJSClient('https://wiki.example.com', auth='key') as client:
|
|
... pages = await client.pages.list()
|
|
|
|
Features:
|
|
- Synchronous and asynchronous clients
|
|
- Type-safe data models with validation
|
|
- Comprehensive error handling
|
|
- Automatic retry logic with exponential backoff
|
|
- Professional logging and debugging support
|
|
- Context manager support for resource cleanup
|
|
- High-performance async operations with connection pooling
|
|
"""
|
|
|
|
from .auth import APIKeyAuth, AuthHandler, JWTAuth, NoAuth
|
|
from .client import WikiJSClient
|
|
from .exceptions import (
|
|
APIError,
|
|
AuthenticationError,
|
|
ClientError,
|
|
ConfigurationError,
|
|
ConnectionError,
|
|
NotFoundError,
|
|
PermissionError,
|
|
RateLimitError,
|
|
ServerError,
|
|
TimeoutError,
|
|
ValidationError,
|
|
WikiJSException,
|
|
)
|
|
from .models import BaseModel, Page, PageCreate, PageUpdate
|
|
from .version import __version__, __version_info__
|
|
|
|
# Public API
|
|
__all__ = [
|
|
# Main client
|
|
"WikiJSClient",
|
|
# Authentication
|
|
"AuthHandler",
|
|
"NoAuth",
|
|
"APIKeyAuth",
|
|
"JWTAuth",
|
|
# Data models
|
|
"BaseModel",
|
|
"Page",
|
|
"PageCreate",
|
|
"PageUpdate",
|
|
# Exceptions
|
|
"WikiJSException",
|
|
"APIError",
|
|
"AuthenticationError",
|
|
"ConfigurationError",
|
|
"ValidationError",
|
|
"ClientError",
|
|
"ServerError",
|
|
"NotFoundError",
|
|
"PermissionError",
|
|
"RateLimitError",
|
|
"ConnectionError",
|
|
"TimeoutError",
|
|
# Version info
|
|
"__version__",
|
|
"__version_info__",
|
|
]
|
|
|
|
# Package metadata
|
|
__author__ = "Wiki.js SDK Contributors"
|
|
__email__ = ""
|
|
__license__ = "MIT"
|
|
__description__ = "Professional Python SDK for Wiki.js API integration"
|
|
__url__ = "https://github.com/yourusername/py-wikijs"
|
|
|
|
# For type checking
|
|
__all__ += [
|
|
"__author__",
|
|
"__email__",
|
|
"__license__",
|
|
"__description__",
|
|
"__url__",
|
|
]
|