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)
    

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pyliblo3-0.16.2-cp312-cp312-win_amd64.whl (135.8 kB view details)

Uploaded CPython 3.12 Windows x86-64

pyliblo3-0.16.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (635.5 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

pyliblo3-0.16.2-cp312-cp312-macosx_11_0_arm64.whl (176.1 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

pyliblo3-0.16.2-cp311-cp311-win_amd64.whl (136.6 kB view details)

Uploaded CPython 3.11 Windows x86-64

pyliblo3-0.16.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (648.4 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pyliblo3-0.16.2-cp311-cp311-macosx_11_0_arm64.whl (176.7 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

pyliblo3-0.16.2-cp310-cp310-win_amd64.whl (136.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyliblo3-0.16.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (603.3 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pyliblo3-0.16.2-cp310-cp310-macosx_11_0_arm64.whl (175.8 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for pyliblo3-0.16.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6cffe12010839b7eb78f7d399d4816e72155b0fd8815a508b7215b24142a84c5
MD5 28002e847790fe33b1ffe408bb0bcc5f
BLAKE2b-256 5b736167bb8f913121fc1310d3019237f58c2c20f424a75695fd31530e85eeeb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyliblo3-0.16.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b587c483eddf1805711d516013f74af3d3327ccabcf11d51106d51521cb1d82d
MD5 ad3335983b731f661c8bde55d20f6322
BLAKE2b-256 adcd36866ad6aefc261f635546580740d81348779ffeaec6000a6fccbc2fcf6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyliblo3-0.16.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dfbed0effcc3e859ee406b951f48f8b881a52b41e3e9c849501bc474eb5896f6
MD5 9d94442ac3e05a91bcc12fae474ed6ae
BLAKE2b-256 7bd333930c364335f64c90fa7a1dcff7010e074b7ad215941bb0c913db35b6a3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyliblo3-0.16.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 22a216da8598e6502eeefa35085c9cfcd166e441c60298868c105e1e1e22132e
MD5 12b9ebabf9762db689f3874da986913d
BLAKE2b-256 7614d2dd0ab113e5ce5a4b3076b86334ab6385bae1bb2028cf59d14d2c1249b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyliblo3-0.16.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 201ef71d01de122abd03da81becec483878b8eed6bc409ba87b57de99ba81587
MD5 afb050c03b5fdf85f2a2ab053970a917
BLAKE2b-256 00dea58fbeaa1b80b14294d0c7f577d2cc2aac6a487086c69a5cfdf39ec562e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyliblo3-0.16.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0fc341a2d154c7fa5929f2ac7e7464923df2631c6de80dab1f797c5de4e87e87
MD5 8e815c4430b6280ccc3696e00685c01a
BLAKE2b-256 c70f243c9933e483875c7a6bd07e074934054e902a847d73c993778505320225

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyliblo3-0.16.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2bc9041cf9e3874a7acae09063e9bb1d1daa81600804bfc7316350c786f7b4fe
MD5 93591d534a1069cd97f6025a248ccb29
BLAKE2b-256 840bdd9dcb9be0436f57ac4e222f2fd27f787653bc8346cc1c1fd85699ef47b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyliblo3-0.16.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1baa5aa056b670377021c03d2d44a1453ecb97c568f9d63f446dffdd31cf04ee
MD5 3055b6cd53bb163166d92c4c604dcfc0
BLAKE2b-256 fe9bd36e3fd7f08d225bc2bbaa35f66a38767c252efd23d3fcee71c61b073de6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyliblo3-0.16.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b5d9814f08233e514be18c2098b5f76b709bde52be91120862f30981d4d0f702
MD5 22093e91a6cceb89c8a572befddb15c9
BLAKE2b-256 b45515c5cbbb4cd5b0abf18054cc09d1172464e739a2cf5c90c6a4cb9cd979f0

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 Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page