In principle it should use zero cores while it's idle. Normally an exporter only does work when it's being scraped (i.e. handling an incoming http request). If that's not the case, then it's doing whatever you told it to do. Maybe you have an infinite loop or something in your code?
If you copied their sample code:
if __name__ == '__main__':
# Start up the server to expose the metrics.
start_http_server(8000)
# Generate some requests.
while True:
process_request(random.random())
then clearly you'll be using a whole CPU core as this loop spins as fast as it can. This is not meant to be how a real exporter works. Rather, when your application does some other work (e.g. processing an incoming HTTP request) it can also increment counters or whatever.