How to register python microservices with my eureka server (spring boot)

The recommended github project by @AzizSM has not been updated in four years. A more recent project is https://github.com/keijack/python-eureka-client. It was last updated in November 2019.


Need to have REST implementation that follows Eureka-REST-operations . Below is a sample implementation that follow Eureka REST in Python.

Refer to full documentation at Python client for Netflix Eureka

from eureka.client import EurekaClient
import logging

logging.basicConfig()


ec = EurekaClient("MyApplication",
                  eureka_domain_name="test.yourdomain.net",
                  region="eu-west-1",
                  vip_address="http://app.yourdomain.net/",
                  port=80,
                  secure_vip_address="https://app.yourdomain.net/",
                  secure_port=443
)
print ec.get_zones_from_dns()
print ec.get_eureka_urls()
print ec.register()
print ec.update_status("UP")  # Or ec.register("UP")
print ec.heartbeat()