python: Drop superfluous imports and trim public interface.