Well, it seems at least that libtorrent can put webseed info into the torrent file, and this can be used via the python-libtorrent
package. (This means it's not a pure-python approach but that's OK.)
Code sketch:
import libtorrent as lt
piece_size = 256 * 1024
creator_str = "python-libtorrent"
thetracker = "your desired tracker"
theurlseed = "your desired url seed"
fs = lt.file_storage()
lt.add_files(fs, "/tmp/torrentme")
fs.num_files()
t = lt.create_torrent(fs, piece_size)
t.add_tracker(thetracker)
lt.set_piece_hashes(t, ".")
t.set_creator(creator_str)
t.add_url_seed(theurlseed)
t.generate()