Stop/kill a process from the command line after a certain amount of time

The simplest solution would be to use timeout from the collection of GNU coreutils (probably installed by default on most Linux systems):

timeout 10 ./sopare.py -l

See the manual for this utility for further options (man timeout). On non-GNU systems, this utility may be installed as gtimeout if GNU coreutils is installed at all.

Another alternative, if GNU coreutils is not available, is to start the process in the background and wait for 10 seconds before sending it a termination signal:

./sopare.py -l &
sleep 10
kill "$!"

$! will be the process ID of the most recently started background process, in this case of your Python script.

In case the waiting time is used for other things:

./sopare.py -l & pid=$!
# whatever code here, as long as it doesn't change the pid variable
kill "$pid"