Is there a Python SDK that supports encryption well yet? I have a simple command line script to send a message to a Matrix room. About three months ago I tried to add encryption, but apparently the old matrix-python-sdk is deprecated in favor of matrix-nio, but encryption support in the latter was very marginal still.

matrix-nio's encryption is very robust now, but by far the easiest way to hook up a simple commandline script is to pipe it through pantalaimon (https://github.com/matrix-org/pantalaimon) - which acts as a daemon to offload E2EE from your script, using matrix-nio under the hood.