Skip to main content
The core module handles application initialization, component management, and lifecycle operations.

Core Class

The Core class is the central component manager that initializes and coordinates all other modules.

Attributes

Shares
Manages shared files and folders
Users
Handles user management and status tracking
NetworkFilter
Controls user banning and IP filtering
Manages search functionality
Downloads
Handles file downloads
Uploads
Manages file uploads
ChatRooms
Controls chat room functionality
PrivateChat
Manages private messages

Methods

init_components()

Initializes all application components with optional selective enabling.
set
Set of component names to enable. If None, all components are enabled.
bool
default:false
Whether to run in isolated mode (no network features)
Available components include: "error_handler", "signal_handler", "cli", "portmapper", "network_thread", "shares", "users", "search", "downloads", "uploads", "chatrooms", "privatechat", and more.

start()

Starts the application and emits the start event to all components.

connect()

Connects to the Soulseek server using configured credentials.

disconnect()

Disconnects from the Soulseek server.

quit()

Shuts down the application gracefully.
int
Signal type if quit was triggered by a system signal

send_message_to_server()

Sends a protocol message to the Soulseek server.
ServerMessage
The message object to send

send_message_to_peer()

Sends a protocol message to another peer.
str
Target peer’s username
PeerMessage
The message object to send

UpdateChecker Class

Handles checking for application updates.

Methods

check()

Checks PyPI for the latest version of Nicotine+.

Global Instance

A global core instance is available for import and provides access to all application components.