[Feature request]load torrent file from bytes object.
zero-custom opened this issue · comments
Expected behaviour: Just as Torrent.read(), but from bytes object.
example:
var t = bytes('from.some.torrent')
rtb = Torrent.readBytes(t)
Returns: New Torrent instance
You should be able to do that like this:
t = Torrent.read_stream(io.BytesIO(data))
`data` is your byte string.
https://docs.python.org/3/library/io.html#io.BytesIO