[Feature] Allow importing/instantiating Python classes
Is your feature request related to a problem? Please describe. We can import functions (and classes) but not instantiate class objects.
This has been requested a few times and could potentially be useful for third party devices.
This would let you setup devices much like motors and sensors, but backed by your own sensor class.
Describe the solution you'd like It is not entirely clear how this should work.
Describe alternatives you've considered Create the instance in Python, or methods operating on that singleton, and import those. But then you can't choose things like the port.
See also https://github.com/pybricks/support/issues/1635
Instantiating can actually be done. The difficulty is in calling methods.