Skip to main content

Python bindings for the liblo OSC library

Project description

pyliblo3

This is a fork of the original bindings for liblo, making it pip installable.

The provided wheels include the liblo library and don't have any further dependencies, making it completely pip installable

Example

Simple blocking server

import pyliblo3 as liblo
server = liblo.Server(8080)

def test_handler(path, args, types, src):
    print(args)
    
server.add_method("/test", None, test_handler)

while True:
    server.recv(100)

Threaded server

from pyliblo3 import *
import time


class MyServer(ServerThread):
    def __init__(self, port=1234):
        ServerThread.__init__(self, port)

    @make_method('/foo', 'ifs')
    def foo_callback(self, path, args):
        i, f, s = args
        print(f"Received message '{path}' with arguments: {i=}, {f=}, {s=}")

    @make_method(None, None)
    def fallback(self, path, args):
        print(f"received unknown message '{path}' with {args=}")


server = MyServer()
server.start()
print(f"Server started in its own thread, send messages to {server.port}. Use CTRL-C to stop")

while True:
    send(("127.0.0.0", server.port), "/foo", 10, 1.5, "bar")
    send(("127.0.0.0", server.port), "/unknown", (3, 4))
    time.sleep(1)
    

Documentation

https://pyliblo3.readthedocs.io


Installation

pip install pyliblo3

Installation from source

When installing from source, liblo needs to be installed.

Linux

sudo apt install liblo-dev

git clone https://github.com/gesellkammer/pyliblo3
cd pyliblo3
pip install .

MacOS

First install liblo

brew install liblo

Or, without using brew:

git clone https://github.com/radarsat1/liblo
cd liblo
mkdir macosbuild && cd macosbuild
cmake -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" ../cmake
cmake --build . --config Release
sudo cmake --install .

Then install pyliblo3

git clone https://github.com/gesellkammer/pyliblo3
cd pyliblo3
pip install .

Windows

git clone https://github.com/radarsat1/liblo
cd liblo
New-Item -ItemType Directory -Force -Path "windowsbuild"
cd windowsbuild
cmake -A x64 -DCMAKE_GENERATOR_PLATFORM=x64 -DWITH_TESTS=OFF -DWITH_CPP_TESTS=OFF -DWITH_EXAMPLES=OFF -DWITH_TOOLS=OFF ../cmake
cmake --build . --config Release
cmake --install .
git clone https://github.com/gesellkammer/pyliblo3
cd pyliblo3
pip install .

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

pyliblo3-0.16.3.tar.gz (25.6 kB view details)

Uploaded Source

Built Distributions

pyliblo3-0.16.3-cp313-cp313-win_amd64.whl (136.8 kB view details)

Uploaded CPython 3.13 Windows x86-64

pyliblo3-0.16.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (634.6 kB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ x86-64

pyliblo3-0.16.3-cp313-cp313-macosx_11_0_arm64.whl (173.2 kB view details)

Uploaded CPython 3.13 macOS 11.0+ ARM64

pyliblo3-0.16.3-cp312-cp312-win_amd64.whl (137.2 kB view details)

Uploaded CPython 3.12 Windows x86-64

pyliblo3-0.16.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (637.4 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

pyliblo3-0.16.3-cp312-cp312-macosx_11_0_arm64.whl (174.2 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

pyliblo3-0.16.3-cp311-cp311-win_amd64.whl (137.9 kB view details)

Uploaded CPython 3.11 Windows x86-64

pyliblo3-0.16.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (650.6 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pyliblo3-0.16.3-cp311-cp311-macosx_11_0_arm64.whl (173.8 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

pyliblo3-0.16.3-cp310-cp310-win_amd64.whl (137.7 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyliblo3-0.16.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (605.6 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pyliblo3-0.16.3-cp310-cp310-macosx_11_0_arm64.whl (173.1 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

File details

Details for the file pyliblo3-0.16.3.tar.gz.

File metadata

  • Download URL: pyliblo3-0.16.3.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for pyliblo3-0.16.3.tar.gz
Algorithm Hash digest
SHA256 b5a43ec8857fefa4db9f007ace1c457479e2b8155ea13c614b2ec54d289ddca2
MD5 59df45a952d60d40715bb2f8923414fa
BLAKE2b-256 1218788fdfa78afc40306bb1ae86ef591c0db51ab2691cd31a5096401ed3bf2f

See more details on using hashes here.

File details

Details for the file pyliblo3-0.16.3-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for pyliblo3-0.16.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 899588169f0e0794b7f1c3c03cc821beadc8b918ad8003e7d222c778a052207e
MD5 75808418bc9051bc96538208da1d0fb0
BLAKE2b-256 318e7ee377525e7509485c4b3b50f30370c61552dae5012a1d8bd4159e198181

See more details on using hashes here.

File details

Details for the file pyliblo3-0.16.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyliblo3-0.16.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6d3c9d38fb080c4f260ce036798aea39af8baacf3dffd023f27d5c9336d13fe3
MD5 b874fb040eb91210e155851478adca3c
BLAKE2b-256 f5cf1517f3c26dd3fd8800a1f8dab27438007463a655fa2ec5b20b41f3f9a0ed

See more details on using hashes here.

File details

Details for the file pyliblo3-0.16.3-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyliblo3-0.16.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4f7ef4aed335faf1cb2e710a90db3bb953b1822c6392b2dcff8b66f9085f89a8
MD5 eb07e6d640773a819ac161fad192110e
BLAKE2b-256 a7984cde2bf2a42ff46f53f1cfbe590ec33eb3e107495cb8123013b3d9f52cc6

See more details on using hashes here.

File details

Details for the file pyliblo3-0.16.3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for pyliblo3-0.16.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c0b7afe7df03e685a8eb4b185ebc8e513da7e6708633673f204c0fc1d06f92f2
MD5 9215139d2a1f2cd90c196ac9ebfba79f
BLAKE2b-256 d52f5f6cec5f9438a56fe461f251a662cf6fe96707a07c96fbe073303239a40a

See more details on using hashes here.

File details

Details for the file pyliblo3-0.16.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyliblo3-0.16.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9c2245f5839367a7111193abfc8ef4a2def133589c13a907eaf0c5f19447b221
MD5 f820b1177e202f56a61fb6d4760b0c50
BLAKE2b-256 47e805838061cbf5f6e6a7f2f29366bfdb6010b5dad04996936ca86a61042b65

See more details on using hashes here.

File details

Details for the file pyliblo3-0.16.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyliblo3-0.16.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 043fb6723814f1f01af58ca037b57f166dcfacc0c93c935cb775960f0f865165
MD5 847745dcea236965b1d73571ec59ae3d
BLAKE2b-256 ccc56295606ce7c91dd4a81560272aa5a01e54abc7834e84aacf4218bfde4022

See more details on using hashes here.

File details

Details for the file pyliblo3-0.16.3-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pyliblo3-0.16.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c3dcbd7d96e12ec5d210740d8cd9eb13f260e449fca468d30a67c0f579424b40
MD5 64a31939daac28b804da4faf9bf634e1
BLAKE2b-256 3b2ffae8082cd29c361bb54b304411e44cecf6d4dd7785776c440eaa72b55723

See more details on using hashes here.

File details

Details for the file pyliblo3-0.16.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyliblo3-0.16.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e5d6e91b925865c415724131def1b82272f00769b0be0f36ae97c659cef3651d
MD5 389144801c332c8f0e92e9031dc61064
BLAKE2b-256 9077654934d4ae1c8ac54267679f53177f43a98b0c79b588c50bae32f1fe5a8c

See more details on using hashes here.

File details

Details for the file pyliblo3-0.16.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyliblo3-0.16.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 602f3efdb6465117d482f72b4306f854b0d6d1c2a18094353c1cc7b1a5735ddd
MD5 dd20777cd787590bb230f650773ea2b2
BLAKE2b-256 5f40f3d6aaced15b7fa0d52cb68e5e22b46f873786864e309aecd43e00253540

See more details on using hashes here.

File details

Details for the file pyliblo3-0.16.3-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pyliblo3-0.16.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cfb0f3f4e20efaf168e11757cc4b995cc0ef2e97d8bcef7ed9779bf93f115c61
MD5 25faf44113e1bf16526b5b347e49e98a
BLAKE2b-256 11ceb0ceec181e1fb372936c868faa9afacff58c07d0b64eda7a20945f6a8f3a

See more details on using hashes here.

File details

Details for the file pyliblo3-0.16.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyliblo3-0.16.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 feaa2c3dba0b5a359432bac00d3e76295b70116ff1af770bec5bf1be22929497
MD5 32f380717494f09c8407c9f00a6378b2
BLAKE2b-256 a937882d980652f3c8cea24b646bcf3ff17628b90040b89a50a043af6ba768fc

See more details on using hashes here.

File details

Details for the file pyliblo3-0.16.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyliblo3-0.16.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 420daaa10573f083d9302c1758cc8d0f545c2deaa4fd640bebb22421eb81fef7
MD5 b5b95f10e76175306a1bc3f0ee00d054
BLAKE2b-256 bd0783132d3707e8eb2ee2da7723bad54cee60b17496dc2c81c01bd675bb84e3

See more details on using hashes here.

Supported by

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