{"id":45639,"library":"oai-statsig-python-core","title":"Statsig Python Core SDK","description":"Statsig Python bindings for the Statsig Core SDK, providing feature gates, dynamic configs, experimentation, and logging. Version 0.23.1, supporting Python >=3.10. Active development.","status":"active","version":"0.23.1","language":"python","source_language":"en","source_url":"https://github.com/Statsig/statsig-python-core","tags":["statsig","feature-flags","experimentation","a-b-testing","analytics"],"install":[{"cmd":"pip install oai-statsig-python-core","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"wrong":"from statsig import StatsigServer","symbol":"StatsigServer","correct":"from statsig_python_core import StatsigServer"}],"quickstart":{"code":"import os\nimport time\nfrom statsig import StatsigServer, StatsigUser\n\nserver = StatsigServer()\nserver.initialize(os.environ.get('STATSIG_SERVER_KEY', ''))\n\nuser = StatsigUser(user_id='user123')\ngate = server.check_gate(user, 'my_gate')\nprint(f'Gate result: {gate}')\n\nserver.shutdown()","lang":"python","description":"Initialize Statsig with server key, check a feature gate for a user."},"warnings":[{"fix":"Update imports to 'from statsig import StatsigServer' and reinstall package.","message":"In version 0.23.0, the SDK was renamed from 'statsig-core' to 'oai-statsig-python-core'. Imports changed from 'from statsig_core' to 'from statsig'.","severity":"breaking","affected_versions":">=0.23.0"},{"fix":"Uninstall old package (pip uninstall statsig-core) and install 'oai-statsig-python-core'.","message":"The use of 'statsig-core' package is deprecated. Existing installations using the old name may break on upgrade.","severity":"deprecated","affected_versions":"all"},{"fix":"Call 'server.shutdown()' in a finally block or use context manager if available.","message":"Forgetting to call 'shutdown()' can cause background threads to prevent clean exit.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.23.1':22 '3.10':25 'a-b-test':33 'activ':26 'analyt':37 'b':35 'bind':7 'config':17 'core':3,11 'develop':27 'dynam':16 'experiment':18,32 'featur':14,30 'feature-flag':29 'flag':31 'gate':15 'log':20 'provid':13 'python':2,6,24 'sdk':4,12 'statsig':1,5,10,28 'support':23 'test':36 'version':21","created_at":"2026-06-07T12:56:00.152681+00:00","updated_at":"2026-06-07T12:56:00.152681+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'StatsigServer' from 'statsig_python_core' (/tmp/tmpsrpz6nla/venv/lib/python3.12/site-packages/statsig_python_core/__init__.py). Did you mean: 'StatsigUser'?"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://statsig.com/","github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","analytics"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}