From a4fd06062e409fe261f41261ae681253b6f45c47 Mon Sep 17 00:00:00 2001 From: "m.kindritskiy" Date: Tue, 18 Jul 2023 16:37:18 +0300 Subject: [PATCH] update docs --- README.rst | 15 +++++++++++++++ client/featureflags/client/flags.py | 9 +++++++++ 2 files changed, 24 insertions(+) diff --git a/README.rst b/README.rst index 4f4e991..531f515 100644 --- a/README.rst +++ b/README.rst @@ -27,6 +27,21 @@ Server consists of two services: - grpclib_ + hiku_ +Installation +~~~~~~~~~~~~ + +To install client library for synchronous app: + +.. code-block:: shell + + $ pip install featureflags-client grpcio + +To install client library for asynchronous app: + +.. code-block:: shell + + $ pip install featureflags-client grpclib + Development ~~~~~~~~~~~ diff --git a/client/featureflags/client/flags.py b/client/featureflags/client/flags.py index 13715a7..e47525e 100644 --- a/client/featureflags/client/flags.py +++ b/client/featureflags/client/flags.py @@ -225,3 +225,12 @@ def flags( finally: if tracer is not None: self._manager.add_trace(tracer) + + def preload(self, timeout=None): + """Preload flags from server. + This method syncs all flags with server""" + self._manager.preload(timeout=timeout, defaults=self._defaults) + + async def preload_async(self, timeout=None): + """Async version of `preload` method""" + await self._manager.preload(timeout=timeout, defaults=self._defaults)