aioslsk is a Python library for the SoulSeek protocol built on top of asyncio.
Supported Python versions are currently 3.8 - 3.11
Contents
Install poetry and setup the project dependencies by running:
poetry install
Create a Configuration object pointing with the locations in which to store settings/configs, ...
config = Configuration(
settings_directory="/my/settings/directory",
data_directory="/my/data/directory"
)
Parameter | Type | Description | Default |
---|---|---|---|
credentials.username | string | Username used to login | <not set> |
credentials.password | string | Password used to login | <not set> |
credentials.info.description | string | Personal description, will be returned when a peer request info on you | <not set> |
credentials.info.pciture | string | Picture, will be returned when a peer request info on you | <not set> |
Parameter | Type | Description | Default |
---|---|---|---|
network.server.hostname | string | server.slsknet.org | |
network.server.port | integer | 2416 | |
network.listening.port | integer | Port to listen for other peers (clear) | 61000 |
network.listening.obfuscated_port | integer | Port to listen for other peers (obfuscated) | 61001 |
network.listening.error_mode | string | Defines when an error should be raised when connecting the listening connection (all, any, clear) | all |
network.use_upnp | boolean | Enable UPNP | false |
network.upnp_lease_duration | integer | Length of the UPNP lease duration. 0 = indefinitely | 0 |
network.reconnect.auto | boolean | Automatically try to reconnect to the server | true |
network.reconnect.timeout | integer | Timeout after which we should try connecting to the server | 10 |
network.peer.obfuscate | boolean | When true, prefer obfuscated connections as much as possible | false |
Parameter | Type | Description | Default |
---|---|---|---|
sharing.limits.upload_slots | integer | Maximum amount of simultaneously uploads | 2 |
sharing.limits.upload_speed_kbps | integer | Upload speed limit in kbps (0 = no limit) | 0 |
sharing.limits.download_speed_kbps | integer | Download speed limit in kbps (0 = no limit) | 0 |
sharing.download | string | Directory to which files will be downloaded to | <not set> |
sharing.directories | array[object] | List of shared directories: | <not set> |
The sharing.directories list contains objects which have the following parameters:
Parameter | Type | Description | Mandatory |
---|---|---|---|
path | string | Maximum amount of simultaneously uploads | yes |
share_mode | string | Possible values: everyone, friends, users | yes |
users | array[string] | List of specific users to share this directory with | no |
Parameter | Type | Description | Default |
---|---|---|---|
chats.auto_join | boolean | Automatically rejoin rooms when logon is successful | true |
chats.private_room_invites | boolean | Enable or disable private rooms invitations | true |
chats.rooms | array[string] | List of rooms that will automatically be joined | <empty> |
users.friends | array[string] | List users considered friends | <empty> |
users.blocked | array[string] | List of blocked users | <empty> |
Parameter | Type | Description | Default |
---|---|---|---|
search.wishlist | array[string] | List of wishlist items. Should be a dictionary with 2 keys: query and enabled | <empty> |
Parameter | Type | Description | Default |
---|---|---|---|
debug.search_for_parent | boolean | Toggle searching for a distributed parent | false |
debug.user_ip_overrides | map[string, string] | Mapping of username and IP addresses, overrides | <empty> |
cd docs/
poetry run make html
Running all tests:
poetry run pytest tests/
Running all tests with code coverage report:
poetry run pytest --cov=aioslsk --cov-report term-missing tests/