statsig-io / python-sdk

A python SDK for interfacing with Statsig Feature Gates, Dynamic Configs, and A/B Experiments
ISC License
3 stars 8 forks source link

adds value getter to layer #7

Closed nrj closed 2 years ago

nrj commented 2 years ago

Needs test for exposure logging. I was unfortunately unable to run some of the unit tests.

(statsig) ➜  statsig-python-sdk git:(layer-get-value) python3 -m unittest tests/test_statsig_e2e.py             
server running on port 1234
 * Serving Flask app 'tests.mockserver' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
/Users/nick/.venv/statsig/lib/python3.8/site-packages/werkzeug/serving.py:700: ResourceWarning: unclosed <socket.socket fd=5, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('0.0.0.0', 0)>
  self.socket = socket.fromfd(fd, address_family, socket.SOCK_STREAM)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
 * Running on http://127.0.0.1:1234 (Press CTRL+C to quit)
127.0.0.1 - - [27/Apr/2022 15:42:37] "POST /download_config_specs HTTP/1.1" 200 -
127.0.0.1 - - [27/Apr/2022 15:42:37] code 400, message Bad request version ('0}')
127.0.0.1 - - [27/Apr/2022 15:42:37] "None /download_config_specs HTTP/0.9" HTTPStatus.BAD_REQUEST -
127.0.0.1 - - [27/Apr/2022 15:42:37] "POST /get_id_lists HTTP/1.1" 200 -
127.0.0.1 - - [27/Apr/2022 15:42:37] code 400, message Bad request version ('"py-server"}}')
tore-statsig commented 2 years ago

Assuming this has been unblocked separately, as last I heard your plan was to use DynamicConfig instead