A different style of OSC implementation https://github.com/Theatre-Tools/PyOSC
  • Python 96.5%
  • Shell 2.6%
  • Jinja 0.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Morph 49266f8a45
Add update on version 2.0.0 development progress
Added update note about ongoing work on version 2.0.0 and encouraged user feedback.
2026-07-18 16:47:28 +01:00
.github/workflows ci: fixed the publish workflow to have more granularity. 2026-04-09 21:27:09 +01:00
docs docs: update roadmap.md to clarify features and remove installation instructions for version 1.1.0 2026-04-08 01:41:03 +01:00
examples docs: Reformatted Peer object in UDP example 2026-02-15 22:46:26 +00:00
overrides docs: enhance pre-release warning message for clarity and stability indication 2026-04-05 00:58:31 +01:00
pyosc fix: change warning category from DeprecationWarning to FutureWarning for deprecated /* behaviour. 2026-04-08 15:01:15 +01:00
tests Merge branch 'main' into Add-TCP_NODELAY-flag-to-TCP-socket-and-cleanup-peer-class 2026-04-05 14:41:01 +01:00
.gitignore chore: update .gitignore to include IDE configuration files 2026-01-25 16:19:41 +00:00
CHANGELOG.md docs: update CHANGELOG.md for 1.1.1 2026-04-08 14:03:43 +00:00
lefthook.yml feat: add Lefthook configuration for pre-commit hooks 2025-12-29 20:51:37 +00:00
LICENSE fix: update copyright year in LICENSE file to reflect 2026 2026-02-15 22:59:13 +00:00
MANIFEST.in feat: add MANIFEST.in to include README.md and LICENSE files 2025-12-29 20:53:14 +00:00
mkdocs.yml docs: update cookie consent description for clarity and transparency 2026-04-09 22:35:40 +01:00
poetry.lock chore: update dependencies in pyproject.toml and poetry.lock for improved stability 2026-04-07 00:49:03 +01:00
pyproject.toml chore: bump 1.1.1 2026-04-08 15:01:46 +01:00
pytest.ini Add unit and integration tests for PyOSC components 2026-01-27 01:18:53 +00:00
README.md Add update on version 2.0.0 development progress 2026-07-18 16:47:28 +01:00
run_tests.sh Add unit and integration tests for PyOSC components 2026-01-27 01:18:53 +00:00

PyOSC

Tests
Python library to support OSC (Open Sound Control).

About the Project

I had issues getting the support I needed out of any of the other packages, so I decided to build my own from scratch. I wanted something that was simple to use, and handled OSC peers in a way that makes sense to me, given that most libruaryies try and apply a client server model that doesn't really exist in OSC. I also wanted to support both UDP and TCP transport protocols, as well as both OSC version 1.0 and 1.1. I wanted to make sure the library was flexible enough for me to work the way I wanted to work, and that it would be easy to treat OSC more as an API, than as a messaging protocol.

Update 18.7.2026

Yes, I am still actively working hard on version 2.0.0 of this project. However, It does have to happen in my spare (ish) time, of which I now have a little bit more. I hope to have version 2.0.0 released with new features by the end of hopefully August (2026) however that might slip based on work commitments. If you have any interest in the progess of that, check out the branch 2.0.0 and the issues. If you have any specific features you would like to see in version 2.0.0, shoot an issue over and I'll see what I can do.
- Morph Tollon

Features

  • Support for both UDP and TCP transport protocols
  • Flexible message handling with customizable handlers
  • Support for both OSC version 1.0 and 1.1
  • Background processing of incoming messages to avoid blocking the main thread
  • Simple API for sending OSC messages to remote hosts

Installation

PyPI - Version

You can install PyOSC using pip:

pip install pyopensoundcontrol

or when using poetry:

poetry add pyopensoundcontrol

Documentation

The documentation is currently hosted here, with the source files located inside the docs directory in this repository should you want to contribute to it or run it locally.

Bugs and Issues

If you encounter any bugs or issues, please report them on the GitHub Issues page. Make sure to include a clear description of the problem, steps to reproduce it, and any relevant code snippets or error messages.

Contributing

Contributions are welcome! If you would like to contribute to the project, please follow these steps:

  1. Fork the repository and create a new branch for your feature or bug fix.
  2. Make your changes and ensure that they are well-documented and tested.
  3. Submit a pull request with a clear description of your changes and why they are needed.
  4. The maintainers will review your pull request and provide feedback or merge it if it meets the project's standards.
  5. Please read the CONTRIBUTING.md file for more detailed guidelines on contributing to the project.

Roadmap

See ROADMAP.md for the current roadmap and upcoming features

Dependencies and Thank yous

  • oscparser - A pure Python OSC message parser that supports both OSC 1.0 and 1.1 formats. This library was written by a friend of mine specifically for this project to ensure we have a reliable and flexible OSC parsing solution that meets our needs.
  • pytest - A testing framework for Python that makes it easy to write simple and scalable test cases.
  • socket - A built-in Python library for low-level network communication, used for sending and receiving OSC messages over UDP and TCP.
  • threading - A built-in Python library for creating and managing threads, used to handle incoming OSC messages without blocking the main thread.
  • typing - A built-in Python library that provides support for type hints, used to improve code readability and maintainability.
  • select - A built-in Python library that provides access to the select() function, used for monitoring multiple file descriptors (sockets) for events such as incoming data.
  • Material for MKDocs - A modern and responsive theme for MkDocs, used to create the documentation for this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.