title: Does libcamera only work on the command line?
body: <p>I've upgraded to a Pi 4 running Bullseye recently and learned about the switch to libcamera. I have never used this library, so please excuse what is probably an obvious question. Is there a way to run libcamera, the library that is being pushed as a replacement for picamera, in the same way as picamera within a program?</p>
  <p>For example, here's a code snippit from <a href="https://picamera.readthedocs.io/en/release-1.13/recipes2.html#web-streaming" rel="nofollow noreferrer">https://picamera.readthedocs.io/en/release-1.13/recipes2.html#web-streaming</a>:</p>
  <pre><code>with picamera.PiCamera(resolution='640x480', framerate=24) as camera:
      output = StreamingOutput()
      camera.start_recording(output, format='mjpeg')
      try:
          address = ('', 8000)
          server = StreamingServer(address, StreamingHandler)
          server.serve_forever()
      finally:
          camera.stop_recording()
  </code></pre>
  <p>I understand there's no official Python wrappers for libcamera right now, but is there some equivalent to the 'picamera.PiCamera(...)' declaration/instantiation in either Python or another language? The only examples I can find of calls to libcamera are from the command line, or from a bash script. I'm looking for a way to incorporate the libcamera library into a program in the same way as picamera. The programming language doesn't matter.</p>
  <p>I've seen the workaround for enabling the legacy camera and using the picamera library in the official docs here: <a href="https://www.raspberrypi.com/documentation/accessories/camera.html" rel="nofollow noreferrer">https://www.raspberrypi.com/documentation/accessories/camera.html</a> . I'm not interested in the legacy options, but will use them if I have to because this is for a small, personal learning project.</p>