Prometheus does have a "remote write" API. Its intended for use by Prometheus itself to send metrics to a remote database and is not generally considered good practice for publishing metrics to a Prometheus server, but it is available if it has been enabled with a command line option when the server is started.
See https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver and https://prometheus.io/docs/specs/prw/remote_write_spec/
There is a prometheus-remote-writer Python library at https://pypi.org/project/prometheus-remote-writer/