File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -226,7 +226,23 @@ def __init__(
226226
227227 @classmethod
228228 def from_env (cls , ** kwargs : Any ) -> 'InfluxDBClient3' :
229-
229+ """
230+ Creates an instance of the ``InfluxDBClient3`` class using environment
231+ variables for configuration. This method simplifies client creation by
232+ automatically reading required information from the system environment.
233+
234+ It verifies the presence of required environment variables such as host,
235+ token, and database. If any of these variables are missing or empty,
236+ a ``ValueError`` will be raised. Optional parameters such as precision and
237+ authentication scheme will also be extracted from the environment when
238+ present, allowing further customization of the client.
239+
240+ :param kwargs: Additional parameters that are passed to the client constructor.
241+ :type kwargs: Any
242+ :raises ValueError: If any required environment variables are missing or empty.
243+ :return: An initialized client object of type ``InfluxDBClient3``.
244+ :rtype: InfluxDBClient3
245+ """
230246 required_vars = {
231247 INFLUX_HOST : os .getenv (INFLUX_HOST ),
232248 INFLUX_TOKEN : os .getenv (INFLUX_TOKEN ),
You can’t perform that action at this time.
0 commit comments