# py-wikijs Configuration File # Copy this file to .env and update with your actual values # Usage: Load with python-dotenv package # ============================================================ # REQUIRED: Wiki.js Connection Settings # ============================================================ # Your Wiki.js instance URL (no trailing slash) WIKIJS_URL=https://wiki.example.com # Your Wiki.js API key (get from Admin > API Access) WIKIJS_API_KEY=your-api-key-here # ============================================================ # OPTIONAL: Client Configuration # ============================================================ # Request timeout in seconds (default: 30.0) WIKIJS_TIMEOUT=30.0 # Rate limit in requests per second (default: None - no limit) # Set to prevent overwhelming your Wiki.js server WIKIJS_RATE_LIMIT=10.0 # Maximum number of retries for failed requests (default: 3) WIKIJS_MAX_RETRIES=3 # Enable debug logging (default: false) # Options: true, false WIKIJS_DEBUG=false # Log level (default: INFO) # Options: DEBUG, INFO, WARNING, ERROR, CRITICAL WIKIJS_LOG_LEVEL=INFO # ============================================================ # OPTIONAL: Authentication Settings # ============================================================ # Authentication method (default: api_key) # Options: api_key, jwt, none WIKIJS_AUTH_METHOD=api_key # JWT Token (if using JWT authentication) # WIKIJS_JWT_TOKEN=your-jwt-token-here # ============================================================ # OPTIONAL: Advanced Settings # ============================================================ # Verify SSL certificates (default: true) # Set to false only for development with self-signed certificates WIKIJS_VERIFY_SSL=true # Custom User-Agent header # WIKIJS_USER_AGENT=MyApp/1.0 py-wikijs/0.1.0 # Connection pool size (default: 10) WIKIJS_POOL_SIZE=10 # Enable metrics collection (default: true) WIKIJS_ENABLE_METRICS=true # ============================================================ # OPTIONAL: Cache Settings (for future versions) # ============================================================ # Enable caching (default: false) # WIKIJS_CACHE_ENABLED=false # Cache TTL in seconds (default: 300) # WIKIJS_CACHE_TTL=300 # Cache backend (default: memory) # Options: memory, redis, file # WIKIJS_CACHE_BACKEND=memory # Redis URL (if using redis cache backend) # WIKIJS_REDIS_URL=redis://localhost:6379/0 # ============================================================ # NOTES # ============================================================ # # 1. Security: NEVER commit .env files to git! # Add .env to your .gitignore file # # 2. Loading: Use python-dotenv to load this file: # pip install python-dotenv # from dotenv import load_dotenv # load_dotenv() # # 3. Override: Environment variables set in shell take precedence # # 4. Validation: Use the config helper to validate settings # See examples/config_helper.py