Core API¶
The core API provides the main entry point for connecting to Nexus and initializing the filesystem.
nexus.connect()¶
The main entry point for using Nexus. Auto-detects deployment mode and returns the appropriate client.
Parameters: - config (optional): Configuration source - None: Auto-discover from environment/files (default) - str | Path: Path to config file (.yaml or .json) - dict: Configuration dictionary - NexusConfig: Pre-loaded configuration object
Returns: - NexusFilesystem: Nexus filesystem instance (mode-dependent)
Raises: - ValueError: If configuration is invalid - NotImplementedError: If mode is not yet implemented (monolithic/distributed)
Examples:
# Auto-detect (uses defaults)
nx = nexus.connect()
# With inline config
nx = nexus.connect(config={"data_dir": "./my-data"})
# From config file
nx = nexus.connect(config="./config.yaml")
# From environment
# Set NEXUS_DATA_DIR=/path/to/data
nx = nexus.connect()
See Also¶
- Getting Started - Quick start guide
- Configuration - Detailed configuration options
- File Operations - Working with files
- Error Handling - Exception handling
Next Steps¶
- Configure your backend storage
- Learn about file operations
- Set up permissions for multi-user environments