Files
py-wikijs/examples/config.ini.example
Claude 2ace16f5f0 feat: Add comprehensive configuration system and examples
Added complete configuration support with multiple formats and examples
to help users easily configure py-wikijs for their projects.

New Features:
- Configuration file templates for ENV, YAML, JSON, and INI formats
- config_helper.py: Universal configuration loader and client factory
  * Auto-detects and loads configs from multiple formats
  * Supports environment variables, YAML, JSON, and INI files
  * Provides create_client_from_config() for easy client creation
  * Validates configuration and provides helpful error messages

Configuration Templates:
- config.env.example: Environment variables (Docker, 12-factor apps)
- config.yaml.example: YAML with multi-environment support
- config.json.example: JSON for programmatic configuration
- config.ini.example: INI for traditional setups

Usage Examples:
- using_env_config.py: Complete example using .env files
- using_yaml_config.py: Complete example using YAML configuration
- using_json_config.py: Complete example using JSON configuration

Documentation:
- docs/CONFIGURATION_GUIDE.md: Comprehensive configuration guide
  * All configuration methods explained
  * Security best practices
  * Environment-specific configurations
  * Troubleshooting guide

Benefits:
 Flexible configuration (choose your preferred format)
 Keep credentials secure (no hardcoding)
 Environment-specific configs (dev/staging/prod)
 Docker/container-ready
 Full validation and error handling
 Comprehensive documentation and examples

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 19:41:39 +00:00

92 lines
1.7 KiB
Plaintext

# py-wikijs INI Configuration File
# Copy this file to config.ini and update with your actual values
# Usage: Load with Python's configparser
[wikijs]
# Your Wiki.js instance URL (required)
url = https://wiki.example.com
# Authentication method: api_key, jwt, or none
auth_method = api_key
# Your Wiki.js API key
api_key = your-api-key-here
# JWT token (alternative to API key)
# jwt_token = your-jwt-token-here
[client]
# Request timeout in seconds
timeout = 30.0
# Rate limit in requests per second (0 = no limit)
rate_limit = 10.0
# Maximum retry attempts
max_retries = 3
# Verify SSL certificates (true/false)
verify_ssl = true
# Connection pool size
pool_size = 10
# Custom User-Agent header
user_agent = MyApp/1.0 py-wikijs/0.1.0
[logging]
# Enable debug logging (true/false)
debug = false
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
level = INFO
# Log format string
format = %%(asctime)s - %%(name)s - %%(levelname)s - %%(message)s
# Enable file logging (true/false)
file_enabled = false
# Log file path
file_path = /var/log/wikijs-client.log
# Max log file size in bytes
file_max_bytes = 10485760
# Number of backup log files
file_backup_count = 5
[metrics]
# Enable metrics collection (true/false)
enabled = true
# Metrics format: prometheus, json, statsd
format = prometheus
[cache]
# Enable caching (true/false)
enabled = false
# Cache backend: memory, redis, file
backend = memory
# Cache TTL in seconds
ttl = 300
# Maximum cache size (entries)
max_size = 1000
[cache.redis]
# Redis connection URL (if using redis backend)
url = redis://localhost:6379/0
[features]
# Enable async support (true/false)
async_enabled = false
# Enable batch operations (true/false)
batch_enabled = true
# Enable auto-pagination (true/false)
auto_pagination = true