Python client for Nacos, a dynamic service discovery, configuration, and service management platform. It currently supports Nacos server versions 3.x and Python 3.10+. The library maintains a regular release cadence, with version 3.0.4 being the latest stable release.
pip install nacos-sdk-pythonVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the `NacosClient` and perform basic configuration publishing/retrieval and service registration/discovery. It's recommended to configure Nacos server addresses, namespace, and authentication credentials via environment variables for flexible deployment. For Nacos server 3.x and above, ensure the Nacos server is running and accessible.
Ensure your Nacos server instance is running version 3.x or above when using `nacos-sdk-python` 3.x. Consult the Nacos official documentation for server upgrade guides.
Review the official documentation and migration guides for `nacos-sdk-python` 3.x to understand API changes, particularly when migrating from 2.x. Use `from v2.nacos import ...` for explicit V2 API interactions or advanced configurations like `ClientConfigBuilder`.
Pass `ak` and `sk` parameters during `NacosClient` initialization, ideally sourced from secure environment variables or a secret management system. E.g., `client = nacos.NacosClient(..., ak=os.environ.get('NACOS_ACCESS_KEY'), sk=os.environ.get('NACOS_SECRET_KEY'))`.If experiencing registration issues, verify that `nacos.server.contextPath` is set correctly on your Nacos server, or revert it to its default if custom paths are not strictly necessary.
No dependency data recorded yet.