Skip to main content

Asyncio based SoulSeek client

Project description

aioslsk is a Python library for the SoulSeek protocol built on top of asyncio.

Supported Python versions are currently 3.8 - 3.11

You can find the full documentation here

Installation

pip install aioslsk

Quick Start

Starting the client and sending a private message:

import asyncio
from aioslsk.client import SoulSeekClient
from aioslsk.commands import PrivateMessageCommand
from aioslsk.settings import Settings, CredentialsSettings

# Create default settings and configure credentials
settings: Settings = Settings(
    credentials=CredentialsSettings(
        username='my_user',
        password='Secret123'
    )
)

async def main():
    client: SoulSeekClient = SoulSeekClient(settings)

    await client.start()
    await client.login()

    # Send a private message
    await client.execute(PrivateMessageCommand('my_friend', 'Hi!'))

    await client.stop()

asyncio.run(main())

Development

Install poetry and setup the project dependencies by running:

poetry install

Dependencies

The package uses several dependencies:

Building the documentation

cd docs/
poetry run make html

Running Tests

Running all tests:

poetry run pytest tests/

Running all tests with code coverage report:

poetry run pytest --cov=aioslsk --cov-report term-missing tests/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aioslsk-1.0.2.tar.gz (88.9 kB view hashes)

Uploaded Source

Built Distribution

aioslsk-1.0.2-py3-none-any.whl (103.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page