From 8ba596b33c69e640a5b82afa74d9b76d23e522ca Mon Sep 17 00:00:00 2001 From: manish-wekan Date: Fri, 6 Nov 2026 16:16:27 +0530 Subject: [PATCH 1/7] Add posthog dependency for CLI analytics. Co-Authored-By: Claude Opus 5.5 --- nitrostack/cli/vendor.py | 1 + pyproject.toml | 1 + uv.lock | 275 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 277 insertions(+) diff --git a/nitrostack/cli/vendor.py b/nitrostack/cli/vendor.py index af35dd7..72f384d 100644 --- a/nitrostack/cli/vendor.py +++ b/nitrostack/cli/vendor.py @@ -108,6 +108,7 @@ def _write_minimal_pyproject(dest: Path) -> None: ' "anyio>=4.0.0",\n' ' "packaging>=23.0.0",\n' ' "tomli>=2.0.0; python_version < \'3.11\'",\n' + ' "posthog>=3,<5",\n' "]\n\n" "[project.scripts]\n" 'nitrostack-py = "nitrostack.cli.main:main"\n\n' diff --git a/pyproject.toml b/pyproject.toml index 89b2769..a59108f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,7 @@ dependencies = [ "packaging>=23.0.0", "certifi>=2026.10.19", "tomli>=2.0.0; python_version < '3.11'", + "posthog>=3,<5", ] [project.optional-dependencies] diff --git a/uv.lock b/uv.lock index 31e6ee3..9077aeb 100644 --- a/uv.lock +++ b/uv.lock @@ -40,6 +40,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", size = 67548, upload-time = "2026-03-19T14:22:23.645Z" }, ] +[[package]] +name = "backoff" +version = "2.2.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/47/d7/5bbeb12c44d7c4f2fb5b56abce497eb5ed9f34d85701de869acedd602619/backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba", size = 17001, upload-time = "2022-10-05T19:19:32.061Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/df/73/b6e24bd22e6720ca8ee9a85a0c4a2971af8497d8f3193fa05390cbd46e09/backoff-2.2.1-py3-none-any.whl", hash = "sha256:63579f9a0628e06278f7e47b7d7d5b6ce20dc65c5e96a6f3ca99a6adca0396e8", size = 15148, upload-time = "2022-10-05T19:19:30.546Z" }, +] + [[package]] name = "backports-asyncio-runner" version = "1.2.0" @@ -177,6 +186,169 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/aa/29/35e016098c814cd93de9cd320c66b5bfba14dc6ecedd3cb518fa7c408c69/cffi-2.1.1-cp315-cp315t-win_arm64.whl", hash = "sha256:d18e5ac0f2f03f4f518d3e23db0f0cad7faa1da8620e9c09461d443bbf6e6692", size = 186360, upload-time = "2026-08-03T21:21:13.636Z" }, ] +[[package]] +name = "charset-normalizer" +version = "3.5.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/33/1c/f41d4e74c28ab327ff3acd36053f7ea506c55872d7a90b0fa71aa3ab0c89/charset_normalizer-3.5.2.tar.gz", hash = "sha256:39de2a259fc954455c57274dc94c79d5842774e1247a016aff30bc0efed0f4ef", size = 172659, upload-time = "2026-09-30T04:39:23.398Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/98/77/46e87bcfc45d25ab4db7cfc9bb544bfa3ffd302289ed31ae93f5433eb899/charset_normalizer-3.5.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:195c26fb65950f8fce54e26349852b7bdd7c5f120aeefbcc440b8a20faaed4a3", size = 373348, upload-time = "2026-09-30T04:34:42.843Z" }, + { url = "https://files.pythonhosted.org/packages/52/fc/e518013affcc43c9f919c3ba41bffe9b4ee4aceb0a6462a6243efcca5f2d/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9373ad13ef0d2c0fb761e04e55bfdee5a08b52cef2c882c8fbe9935b1517152e", size = 260860, upload-time = "2026-09-30T04:34:44.817Z" }, + { url = "https://files.pythonhosted.org/packages/d5/ad/2a895c945ee61988dfd9ccee64f0b78dc09f29c9b34d1dd545246d78e0ad/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:ddf19c062bea7a0cc80f519243d2c01dd091be0cf952a0750d4ad576709559f5", size = 246491, upload-time = "2026-09-30T04:34:46.227Z" }, + { url = "https://files.pythonhosted.org/packages/c9/05/5d958bc8ea503e26be25ada5430fd409cfb45dc22ff33f9f96e649613c99/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3d14b50de6bf4d0edf857a9386836846f982b8f524e188e2e68b96d702bcf4aa", size = 290875, upload-time = "2026-09-30T04:34:47.691Z" }, + { url = "https://files.pythonhosted.org/packages/55/e2/06bad57dfdb49cad92c0ba85b6b4fa5827a67df37897287cfef0553843c2/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:28a15fdad492a99b6eccfaaed66ef3f74050680545ea61ec8b2f4c538f1f1320", size = 286987, upload-time = "2026-09-30T04:34:49.356Z" }, + { url = "https://files.pythonhosted.org/packages/c4/9f/9f52d2886d52645987d603425482c63c5045a3005db1354a7097e5ed1ae9/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8a893cc101149f80a653f82062ebc95b34525a2614382e1da5458fe7c6997249", size = 271105, upload-time = "2026-09-30T04:34:50.957Z" }, + { url = "https://files.pythonhosted.org/packages/4a/41/e05e19578b7b87e7db2c3ecb884bd09d065274ab41e1f535542e8bae9b06/charset_normalizer-3.5.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:619799369eeef6366ed3e8755a5670f4f2f0fb6b30a0fd7264dc0fdc2357058e", size = 269833, upload-time = "2026-09-30T04:34:52.623Z" }, + { url = "https://files.pythonhosted.org/packages/c2/cd/fc7152414561ff78f9c61a4a627025f65fd244abaefc99ac4e75c6169b33/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:447441e76ec720b15e64418d32e092297340387053047c7c694f579efb0ee1d9", size = 263048, upload-time = "2026-09-30T04:34:54.013Z" }, + { url = "https://files.pythonhosted.org/packages/71/71/fb379e399b1013962716a059d551e03bd80b3e02f05d81246886af6c0958/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:62588a277bfb59def052abd940703fa35107152bf479781a878617d60faf8fb5", size = 249237, upload-time = "2026-09-30T04:34:55.373Z" }, + { url = "https://files.pythonhosted.org/packages/33/4f/aeadccd6d20882909eb2597ec40eccc05d505e2262f14dc76d7620700657/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:44bd4fbb29dfbeba60e7d2bd000c59e4b21ddb3cc53912b14048d37092706d7c", size = 290756, upload-time = "2026-09-30T04:34:56.867Z" }, + { url = "https://files.pythonhosted.org/packages/b9/7b/e8a92613236b257d3b75d532496eb21f68ad8231d7d56df94497e460112e/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:30fcd120b732aa79317f08dee04d7de0847822e4cf7ee0e9f445bb958832252c", size = 269026, upload-time = "2026-09-30T04:34:58.278Z" }, + { url = "https://files.pythonhosted.org/packages/ff/ac/21d5c6b972285c5f095ff78afdc99f3539e3985dfcf7ff1cfbe9e772f529/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:50e3adfb96fc189eb27b1cf62d3b598b89b4bb0420d93a3d3e42e137409011be", size = 287601, upload-time = "2026-09-30T04:34:59.703Z" }, + { url = "https://files.pythonhosted.org/packages/59/72/263491ec1494a194b16fcbff88a0220f2af633738c79e92b4d7189226322/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b736353c0a625bbd5fcec108576e2385db3496f4f771f785ff32e108d3c3bc45", size = 272660, upload-time = "2026-09-30T04:35:01.26Z" }, + { url = "https://files.pythonhosted.org/packages/38/7a/81f1186c57e406233969ae96b5fd0c907254ab8b6e47da8ae24cd20fb9d7/charset_normalizer-3.5.2-cp310-cp310-win32.whl", hash = "sha256:f5833ad231be5eb6553de524a70f48d71b2c8563101750531e0b80184e175cd4", size = 187301, upload-time = "2026-09-30T04:35:02.659Z" }, + { url = "https://files.pythonhosted.org/packages/ae/ab/fb8b5178fdf7bf68efa61cbe892286bc9f73846f26147d4725fb89388475/charset_normalizer-3.5.2-cp310-cp310-win_amd64.whl", hash = "sha256:1461ac396c4fdb983a675f20aa555624f0ee18ac83d832b9244ffff3d8055275", size = 215446, upload-time = "2026-09-30T04:35:04.011Z" }, + { url = "https://files.pythonhosted.org/packages/36/40/e270b74e0d3f583d78d902960845a149e80eb7c737ee5613ccc6efc7264b/charset_normalizer-3.5.2-cp310-cp310-win_arm64.whl", hash = "sha256:c6708715abcf3c73b99508253e961a9967f02fe536532834149574eda6de0d1c", size = 203389, upload-time = "2026-09-30T04:35:05.577Z" }, + { url = "https://files.pythonhosted.org/packages/22/67/6a0b94a7960d5e1b5eacd2fb529f3fccc47db4644f7f0a7cfdcfc3be578a/charset_normalizer-3.5.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3d21b8b13c7592db2ac5e544a6d83187b995257472b0c9e8351b6d507ae37ed6", size = 370642, upload-time = "2026-09-30T04:35:06.91Z" }, + { url = "https://files.pythonhosted.org/packages/fb/94/01009e13b94041599004edf32e56e382c24e570f60f79bab8efe45cfe1eb/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d760fe2a4d7c3b226cb9026d6a842868d52a7901bd98420e1baf14e80da85cf5", size = 259280, upload-time = "2026-09-30T04:35:08.448Z" }, + { url = "https://files.pythonhosted.org/packages/66/85/3b5358f60a13210f0b67d3755c168ef758701b021e655d88d4da28554467/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c9790464842f85f437dbbb54417eda1e0e6bfc52dd8d22d6fd1c994b73b2dc74", size = 245335, upload-time = "2026-09-30T04:35:10.104Z" }, + { url = "https://files.pythonhosted.org/packages/74/75/77c1c479b09ecd751d1e767b251ea5c14d4d50ff757bf404afab2692f600/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4685902cf26edf013ed7a3da0f426ebba7a00ebb9541386d835afbf002c11cab", size = 291707, upload-time = "2026-09-30T04:35:11.575Z" }, + { url = "https://files.pythonhosted.org/packages/0b/0d/363f78cacb70f58f15f4b083961bbd9d292f335d3f5c66fc4f1cfe69cb90/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4495c5002a7b28557e7e222e77e0b661183e432b7d6d2e788101e3f240e05b8c", size = 286747, upload-time = "2026-09-30T04:35:13.022Z" }, + { url = "https://files.pythonhosted.org/packages/e4/ed/cf505d3011ffceb12c2067a7a5d3cfe92b875d4d44bb0ff0d69375e2c184/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:211d5a3eb6af8f513b8d4ca19a8c1b7accab1b5f0d3175f9826b03c1a920dc1f", size = 269972, upload-time = "2026-09-30T04:35:14.606Z" }, + { url = "https://files.pythonhosted.org/packages/15/d8/f0a93a431d170e7ca681d4f6650fee3de934d18560e474e7267eb4b0f987/charset_normalizer-3.5.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ef4fcbf3327382cd4c9f540babd61248208af7b93eec4de397b4d5f58a09e288", size = 269339, upload-time = "2026-09-30T04:35:16.087Z" }, + { url = "https://files.pythonhosted.org/packages/86/bd/9b2bd1c5b7af02462c9752d33994834ff972a96b4c483eefde9e594488e2/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bd16aabe4a02a297c23417aa17ac6299dbd8c49f673bcd645b4929b11f5a4400", size = 261683, upload-time = "2026-09-30T04:35:17.488Z" }, + { url = "https://files.pythonhosted.org/packages/76/a5/cac540ab0fd61f3fec88ad3dbb64509e71424593d73cfdfff5ab3e4db279/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:fb9e68df06293761f9fe66ade60a9bc6d0f5e42b8acf2939a9158af86ab0e5bd", size = 248143, upload-time = "2026-09-30T04:35:18.849Z" }, + { url = "https://files.pythonhosted.org/packages/71/7a/ff467301deef2089fad87f72df9e000a26a78fec7acbb18e1999371b8369/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:59f63901b0031c3136cf64704dcb21de0bbae62ce2c9529bc39d27665463de37", size = 292358, upload-time = "2026-09-30T04:35:20.326Z" }, + { url = "https://files.pythonhosted.org/packages/ad/77/22d7e785d1e210afc2e2f58600dd1799d17a35665faf84383f002826c5f8/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:304d5463e65a35d7bb0850550e0780395395f6fcf452f04db7d5ca7cecc425ac", size = 268766, upload-time = "2026-09-30T04:35:21.72Z" }, + { url = "https://files.pythonhosted.org/packages/ae/91/e8e946267f1c2d9e2bd651726e2fbd2addf02c4d36cea5069e32ca9d7bb5/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9cf9b1a857e25c4baceeb3624e92a56df3668f398c4acba74e174d81fb4d1d3a", size = 287432, upload-time = "2026-09-30T04:35:23.273Z" }, + { url = "https://files.pythonhosted.org/packages/4e/88/7561d8a88d555e7df6623abe7c0070b4baf47549b9408783a2ae0a1a6cf7/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:114e4d0c92d618409ed82a99e22b5c5e768fe995f2973f78265f4524f49d4640", size = 272470, upload-time = "2026-09-30T04:35:24.655Z" }, + { url = "https://files.pythonhosted.org/packages/35/7e/578c702301ec036f01455f30744a08d2b42f6ab35b9b2d4bf8cae0ef2a80/charset_normalizer-3.5.2-cp311-cp311-win32.whl", hash = "sha256:2625388c6c754520c37abaf3b41eb34d1cc4a373f457898f08606c8e362b891d", size = 186688, upload-time = "2026-09-30T04:35:26.225Z" }, + { url = "https://files.pythonhosted.org/packages/e8/fc/fdf8cf52ff21cd5bf158f20978991cf985325842f74283eb6df26c8a39d8/charset_normalizer-3.5.2-cp311-cp311-win_amd64.whl", hash = "sha256:87e50a3e7cb90af586b6c5faf23e302a970415ac73bd7bd90a515a04b427ef96", size = 214932, upload-time = "2026-09-30T04:35:27.796Z" }, + { url = "https://files.pythonhosted.org/packages/97/66/3e45a506d8110b632541faf9a9470185aa9878f1ed44020f31346c1c5e5b/charset_normalizer-3.5.2-cp311-cp311-win_arm64.whl", hash = "sha256:254eb48b9fa5ee9898a3c445825a1f340fe53712a098904b39b0bddba8ea3cb1", size = 202828, upload-time = "2026-09-30T04:35:29.259Z" }, + { url = "https://files.pythonhosted.org/packages/e7/c8/693809898870237d82785a03f3b2b58fe4c9f14669f84a7d4e623c92a59e/charset_normalizer-3.5.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ed2a239c0ea213acc1908150a3037257083c7c083128f1a4cec2ec4b97dca491", size = 367780, upload-time = "2026-09-30T04:35:30.888Z" }, + { url = "https://files.pythonhosted.org/packages/c9/87/2fea8c13dc24b3ca9c6f803a5b2dfdeae73eb4f9e12c7885ed908ff0433c/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b91363207bd9dc966a691e959bb47f64b30f7ac4b072be9968b366982f7db77c", size = 246730, upload-time = "2026-09-30T04:35:32.286Z" }, + { url = "https://files.pythonhosted.org/packages/a8/9e/09efac30b937722f46d3110ba30b875b24b2e3a266ed746cc4e376a94d80/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:38a873987f3be698494da8b2e3085e29da02da7b633dce73e79c699a113d7bf0", size = 237707, upload-time = "2026-09-30T04:35:33.709Z" }, + { url = "https://files.pythonhosted.org/packages/9e/18/70d76670b13686237863a379928d60bd10e021f17d243ab3d7014c4a5f4e/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:355ad8011081dec5412240c087a9a0c9d4d5039f3ed11a3f13e18c2b29b56c51", size = 273050, upload-time = "2026-09-30T04:35:35.138Z" }, + { url = "https://files.pythonhosted.org/packages/54/e2/77a8b09d5adc013ed07b95b01b8b8fa5441c4e810e83ee7e4aae2fa4d91a/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ee21e28f0430bd6dc9086c6e525d5e818a44a5ad19720c8a0ef766792f3eb5e5", size = 270345, upload-time = "2026-09-30T04:35:36.502Z" }, + { url = "https://files.pythonhosted.org/packages/7f/c5/38806a25ab5e65fc178f39affeda20858efafede2fce1ffc2556cfc9fe73/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3d31298449090ab8d47b7b1b2a555ff73cac7ed438a08b7ac160980c7ebed649", size = 257601, upload-time = "2026-09-30T04:35:37.919Z" }, + { url = "https://files.pythonhosted.org/packages/ae/8d/213565184708fdb263ae55e2c04ee1ff748129dd65d48ed0e3502da9c85a/charset_normalizer-3.5.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5cde776b7cc66e4f6c99612cea4aa7269aa65863f7a15841b2c264f103822f4e", size = 252222, upload-time = "2026-09-30T04:35:39.544Z" }, + { url = "https://files.pythonhosted.org/packages/7e/24/76d2cefc25472531e4c5c7dfff68865eb1c39b78482f0fdc15b46f047830/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ae4f5fea5b8b8ccff88238cc8569303e5ee95efae67fa62922a311397a71f346", size = 248482, upload-time = "2026-09-30T04:35:41.088Z" }, + { url = "https://files.pythonhosted.org/packages/7d/dc/65a801b66ab4c197e22c433ab25e7ac24324ac6f45a2269aca42cce309bf/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:f7d486c83842422badd511868fd8a9a20e9407ace71564b6af47ce7e60a336c1", size = 241206, upload-time = "2026-09-30T04:35:42.59Z" }, + { url = "https://files.pythonhosted.org/packages/a7/95/ca9b5eabde673002c6f1e7ada1b223916fe18f6d661da7aabd4d643718f1/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:11a4d68a6ecda3292cb1e50239e111543ba5d709bb62a6b4ea1afcfa729d8875", size = 273190, upload-time = "2026-09-30T04:35:44.347Z" }, + { url = "https://files.pythonhosted.org/packages/2d/8b/803b4d2a3f6e1740f63f1e87b04d14b42f3d4fdfe6ed7d4db2d34102b14f/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d6734d2ef8a50fbf8445c139477da401f50d62a0606bf00e20ec6d87773fefb1", size = 253527, upload-time = "2026-09-30T04:35:45.915Z" }, + { url = "https://files.pythonhosted.org/packages/a9/55/93c0e5dbd085ae0471346026abbe7e0db9ea2d6fea74e51f0b5a46f233a7/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:a815775b6c38d4e0ff7bcffbeba67feded90202bb6a226b8dd35f1c855217413", size = 271285, upload-time = "2026-09-30T04:35:47.49Z" }, + { url = "https://files.pythonhosted.org/packages/95/69/0dbd0e0b9b16cfa816cdfcb3e2e3854a1f680dc07fb1245ea125e7448060/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:23851fb4e1b85ed3f6c2a27b777cdfe2e19fb5b38429a8faf38c7542b7665869", size = 260010, upload-time = "2026-09-30T04:35:48.996Z" }, + { url = "https://files.pythonhosted.org/packages/58/9d/e7b88e7b1bf403590c3b573277b5e1e488c68c7a6fbacca310a2c324e90c/charset_normalizer-3.5.2-cp312-cp312-win32.whl", hash = "sha256:db19d07e2e0129e974a0e65d0064fc222a446cd5122c2fd4184d2af9fc734a9e", size = 184125, upload-time = "2026-09-30T04:35:50.777Z" }, + { url = "https://files.pythonhosted.org/packages/eb/e6/e6e083884cbcfd49c64865af05027fe7011be7b2d9179524f099a1b611f3/charset_normalizer-3.5.2-cp312-cp312-win_amd64.whl", hash = "sha256:780fbe7cab297b81dad9fb8dc5eb003c0468ffb0d9e5f65068c53a34661a96bc", size = 207486, upload-time = "2026-09-30T04:35:52.194Z" }, + { url = "https://files.pythonhosted.org/packages/c4/e3/017aea0911ada7405a825c7d937eb3a13009664e2f5b38e8c4bbf2abf894/charset_normalizer-3.5.2-cp312-cp312-win_arm64.whl", hash = "sha256:e2af3aad578aa6bd1384bcf4750fc285e5a9de53f40b7d41e5a0bf748edeb2b3", size = 196734, upload-time = "2026-09-30T04:35:53.636Z" }, + { url = "https://files.pythonhosted.org/packages/c5/34/68292d68512768591aaff07c59bb53ee31341c87759433a859c4641a50c2/charset_normalizer-3.5.2-cp313-cp313-android_24_arm64_v8a.whl", hash = "sha256:ed905975ab14056a2e5eb1c376cb2e1ebc5396baf84163939c518556fccde9f5", size = 225946, upload-time = "2026-09-30T04:35:55.313Z" }, + { url = "https://files.pythonhosted.org/packages/e3/80/bee0b01b90ccd5322ae1d0abb33fab1bd95b7c2eadaf02aeccf22e04ee83/charset_normalizer-3.5.2-cp313-cp313-android_24_x86_64.whl", hash = "sha256:a66c3bc5ab1f0ff2164fc9965ddd611ff0802173f4b9d24554c563f6ab7e1d6e", size = 238619, upload-time = "2026-09-30T04:35:56.863Z" }, + { url = "https://files.pythonhosted.org/packages/78/6e/60ce52a85a7fd631ae8482ae6d74521014ca2f255892679484dc04d7ef56/charset_normalizer-3.5.2-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:d2374b62878abb00cd8309b32af6c0b715cd02dec0ca74ef12e5069bdc64144a", size = 206701, upload-time = "2026-09-30T04:35:58.639Z" }, + { url = "https://files.pythonhosted.org/packages/36/8c/71aafad23f971afc84c2b295bc0c560739ce1dac558aad9fec22e39f3639/charset_normalizer-3.5.2-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:d376bbd28b3a8999db1a103b3b388aee6f1ddeb3e51bc2172993efdcd86e064d", size = 210506, upload-time = "2026-09-30T04:36:00.147Z" }, + { url = "https://files.pythonhosted.org/packages/91/da/3c5a7798c046df7d2d68ad653cf5b6c5a8bfee225055a843c6f2f42aac1a/charset_normalizer-3.5.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6045373d5a89a5ec71afde535db987ca28e76dfa276c2d4c818265b375d4b055", size = 366626, upload-time = "2026-09-30T04:36:01.77Z" }, + { url = "https://files.pythonhosted.org/packages/e1/16/710ac3de2ee354e2bd1a9c94efe45a2d27b5c6ad39b2d6a905be2c094b6c/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:849df64e889b2e17230d58410a03dba311a65b163508fd33679b2b737d4b7858", size = 244624, upload-time = "2026-09-30T04:36:03.389Z" }, + { url = "https://files.pythonhosted.org/packages/d6/39/45c7439f5b63d24f7d5b2a1d760f34af7628782d7144b4cc8ded45c2d4bc/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:15c44f7edfd477b06f517a5cc317fc1707edb9de2c865f43d4b6513907473234", size = 235731, upload-time = "2026-09-30T04:36:04.987Z" }, + { url = "https://files.pythonhosted.org/packages/4d/34/38f3154785ce92e9f56eb226f4d35bdfae6b008480dd055f58837a89c810/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a89012d6d5476ee112d20d998570ed58df2260a852afb1758809cd6900411d21", size = 270352, upload-time = "2026-09-30T04:36:06.412Z" }, + { url = "https://files.pythonhosted.org/packages/04/f3/859f74e7babc977705026b30593b3be04049632a522fb7000f83c033d747/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0c951d5e6dd9c2ff60609476752bee49da4206adde960ebc247766937f72e718", size = 267393, upload-time = "2026-09-30T04:36:07.865Z" }, + { url = "https://files.pythonhosted.org/packages/4b/85/41d27f234b82e47c167a5f6c0f62501dc0c640585ff4aba79e08a390336a/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7218e8f32b0956cfcd048fd42d9d5779809745ca1d86113ca56f66e7ae1549c4", size = 254660, upload-time = "2026-09-30T04:36:09.248Z" }, + { url = "https://files.pythonhosted.org/packages/58/ca/5d1a997587febe5b26d8daffe363b5c1a091cece19828eec6502fd09c5ef/charset_normalizer-3.5.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a19a731138fc27d5682277d3b9df22855cea1239bce7fcec5f78f42ef2d1f3c3", size = 249996, upload-time = "2026-09-30T04:36:10.73Z" }, + { url = "https://files.pythonhosted.org/packages/b3/1f/d1e78246f7ed60c8c8d606b4ac27f66ce49cc3e95f24893ccbeba9f77302/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:62603db9a7caa0802eaa28c1c46fecd7b3a263a774069c24c3c28c302448721c", size = 247028, upload-time = "2026-09-30T04:36:12.294Z" }, + { url = "https://files.pythonhosted.org/packages/8e/37/eba316edd4f0c4d3a5d945924c4eeeae59abac4056aa815d8a4268f863a2/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:b6856554c4f44d79fc2307d5768854310a8f0096e501c75637542c82292b0429", size = 240562, upload-time = "2026-09-30T04:36:13.887Z" }, + { url = "https://files.pythonhosted.org/packages/c8/8e/aaa037d40ca9ef045977f1a661048b1aa33f223adfce3452fe9be9f79d14/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:1bc0baf5ef96b6ede57d47f4b8fe4d9d84019c3bfcbeb20a41edc6a6ee341f1f", size = 271699, upload-time = "2026-09-30T04:36:15.41Z" }, + { url = "https://files.pythonhosted.org/packages/26/19/1c1c9f75974adf523b87f34b8a2adc5a435cd65916812bcbd0dfa45f9a29/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:56bc200a365efb37383b7852e4cc5898d3b2da5987289b543956cf8cad71018a", size = 252030, upload-time = "2026-09-30T04:36:16.839Z" }, + { url = "https://files.pythonhosted.org/packages/bc/90/0660ef18e18df0a4d2a1a0edff7dfbba42d4e50ef2425557a5bb7051f77b/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:2c9ad19a6cfcd5ea5c0d41161d22f9df1dcc277e9bef2751391334546a314c00", size = 268565, upload-time = "2026-09-30T04:36:18.468Z" }, + { url = "https://files.pythonhosted.org/packages/79/ba/57adc269824e8658f1a0f97a9e514c247445a9632b3419b97e0ba37f16dc/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e243bd13217235fc7290c621941c3f5cc8b66e4872495be821d7436ba2fb838d", size = 257627, upload-time = "2026-09-30T04:36:19.938Z" }, + { url = "https://files.pythonhosted.org/packages/9a/85/33abd4315c052d3d4f54c92b1ee49bfbc0dc7115a981e462a793b6d2ab87/charset_normalizer-3.5.2-cp313-cp313-pyemscripten_2025_0_wasm32.whl", hash = "sha256:a090bb2c68df85450502e3e20d665e3a5af9c65a84d6508ed477badd49166fd3", size = 143407, upload-time = "2026-09-30T04:36:21.376Z" }, + { url = "https://files.pythonhosted.org/packages/4f/de/6435e18d1aaa5d910b896d551411c96af1f42a0c56c29afc2016c61ccc2e/charset_normalizer-3.5.2-cp313-cp313-win32.whl", hash = "sha256:2b7b3bbfb4fe8ef40600792d762fbaa9057559f9d3fad209525b7a22b99e91fd", size = 183207, upload-time = "2026-09-30T04:36:22.776Z" }, + { url = "https://files.pythonhosted.org/packages/9c/76/b8ec57f4e9ee3253541abf95e4a462c0175fe8032dcd070f1f2421240942/charset_normalizer-3.5.2-cp313-cp313-win_amd64.whl", hash = "sha256:78456a747de8dc58360ffa581f30a002baf5aa28cb262536545e91f113ed7639", size = 206489, upload-time = "2026-09-30T04:36:24.306Z" }, + { url = "https://files.pythonhosted.org/packages/3e/60/c647c6ae47480221e875ea5d743ff94946f7416e3c69415ab772928e8d32/charset_normalizer-3.5.2-cp313-cp313-win_arm64.whl", hash = "sha256:11912e4bb14baae7c5d8791aa55ba0a3a03ec6729073307b0f57270abaa713d3", size = 195501, upload-time = "2026-09-30T04:36:25.846Z" }, + { url = "https://files.pythonhosted.org/packages/58/ca/7aa91362a2f77ac8e9e28a9b902a74f7d0e11a851ef0d27a74308da8cd90/charset_normalizer-3.5.2-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:1afb975bd5d68d5ce9f6b6d44fdf2f7e34b895a35e95708a7a91b20a3b51d187", size = 226010, upload-time = "2026-09-30T04:36:27.669Z" }, + { url = "https://files.pythonhosted.org/packages/a8/cf/ac8878d0322cf88a1aad4c7b147db32ca0bd806eb0060957b2e31486dbe6/charset_normalizer-3.5.2-cp314-cp314-android_24_x86_64.whl", hash = "sha256:bbbfc8e28816f19d7c0f1816664980c0a9875d01b27cdf8eedddb639d9e108ad", size = 239266, upload-time = "2026-09-30T04:36:29.434Z" }, + { url = "https://files.pythonhosted.org/packages/c9/6d/9a08d7e0b29b7208e2c6c01dc56c8e0520e7c7beadbbfb024b58fd69c8a5/charset_normalizer-3.5.2-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:7967d08cf06dee78443b874f98c98036f624f3a4e73e11f9f64f5be4d25393cf", size = 206783, upload-time = "2026-09-30T04:36:30.872Z" }, + { url = "https://files.pythonhosted.org/packages/82/44/b0aa350280e6ff5a5492d17cf10460dd39d5ee848f872f7ba2df10607f60/charset_normalizer-3.5.2-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:4c2b5031f63e331e3839b40aed2dd6f191e9c07edbde303e7876846ea1946995", size = 210449, upload-time = "2026-09-30T04:36:32.625Z" }, + { url = "https://files.pythonhosted.org/packages/7c/8a/40db9aa9f5907bb0e6f8b6d64064bf8852fb33d4b813ff9414911df7647c/charset_normalizer-3.5.2-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:fcff63213e8e6e47770541a4607175404f47cbb3ebea7b6058cc82d524a0e424", size = 367815, upload-time = "2026-09-30T04:36:34.197Z" }, + { url = "https://files.pythonhosted.org/packages/7f/72/9c5e7707b57c8ddfa9ddf7b0b1d009d7fbab9e9e887d5b721060f37e307d/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8d86d6fc60743dc916eb79e2eb1ec4818e21e427731543af40a3021851174a13", size = 247095, upload-time = "2026-09-30T04:36:35.803Z" }, + { url = "https://files.pythonhosted.org/packages/83/09/71e453691e927de4ddf792770cfaab3f49d494e222f66ea5e404bbd5e39c/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7a881931aa470808df94a8c380eed2bbbc76cd9dc622310f99665658c821eb6d", size = 233942, upload-time = "2026-09-30T04:36:37.407Z" }, + { url = "https://files.pythonhosted.org/packages/9f/86/85c84e4da8b27dd409577d9437926ff581c5f9d3c66038dc68c1a526de51/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8024d00c3faf3fc0c16e07a69f4405e8eac7cc0ab15f65fe6cf43827c4cf72b4", size = 273762, upload-time = "2026-09-30T04:36:38.904Z" }, + { url = "https://files.pythonhosted.org/packages/92/08/564955a4b5f2ccb410ab480bbe8c6a18063ff27f2d35458731c4a5335df9/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4d48f2d08b9de5864e2c8744d4461b862fb149a18274abc8b698c45975573438", size = 269514, upload-time = "2026-09-30T04:36:40.469Z" }, + { url = "https://files.pythonhosted.org/packages/18/24/bad3ac4271589df29cf5ce2f5ae490518a5739358052bd0d61209e6fea54/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:34276fd796040bf0993ab33a369aa572e6979c7aab225a88893667ad8eac8f7a", size = 255056, upload-time = "2026-09-30T04:36:42.02Z" }, + { url = "https://files.pythonhosted.org/packages/d6/3e/350d89ad49916b86554d6f5f2d03ec1152148f87e5ff735106c6a03b1a36/charset_normalizer-3.5.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0521c5665880b33d603717defa76c094048900010897909952397feb3039da56", size = 251311, upload-time = "2026-09-30T04:36:43.577Z" }, + { url = "https://files.pythonhosted.org/packages/56/5b/4970a2d154df502e133402906dd04e3ae7cada7b3011283c88d0479a2585/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:eff0ac9dbe711a4aee69bf04a83896aa9b85f19641264053a9f6d48573abb7dd", size = 250190, upload-time = "2026-09-30T04:36:45.185Z" }, + { url = "https://files.pythonhosted.org/packages/88/8c/f1a91bddc8fb47c2889e29ea7ea49a194eb0d9868675d786806519c00d76/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:1503bccbeb36d5527790c3930327704c39af22de3112f1b1666a9f3ce15ee204", size = 237098, upload-time = "2026-09-30T04:36:46.689Z" }, + { url = "https://files.pythonhosted.org/packages/24/0e/bb5dace3cc7e79068425386a6589c19b5a2ab5fefc2a46abea6919683332/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:52aa6992700996af31f375de0c6bacd402b0097fe40b53c426b9f51a90ebabc7", size = 274228, upload-time = "2026-09-30T04:36:48.31Z" }, + { url = "https://files.pythonhosted.org/packages/9d/79/b849ad523017ea9f5a45581bbebed91439e0cf42fd2860a6f64e358eb5a6/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:e09a3942ecbdee5cce73ea9d42da82b81b72ac1bf031ce069b93b5adf4eac8cd", size = 252401, upload-time = "2026-09-30T04:36:50.091Z" }, + { url = "https://files.pythonhosted.org/packages/89/8c/75469d690cf47200bce8f6cad7655724fc23148e147abfc5ce78b5f65863/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:c7c9ab723cde841fefb34efbad91e87f00a674b1fe1cd0784fde742bf2c154dc", size = 271846, upload-time = "2026-09-30T04:36:51.719Z" }, + { url = "https://files.pythonhosted.org/packages/26/cd/6d52d3c7437cdcf2e310ce9f28f282e733d4ef60ed19105d1819c356255f/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:ddc7dacc8ece3a182e7f15cb862d1fd616b46d076cb1ae9dd232b2c38b655874", size = 258151, upload-time = "2026-09-30T04:36:53.234Z" }, + { url = "https://files.pythonhosted.org/packages/f7/4c/070b38bdb5f49a70199fce923ec0726a49536a63ab262abbfcaaf351110b/charset_normalizer-3.5.2-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:ee43c17b173d46a3212baa6ead3ae258eeabdae48c263a01ccf0218c366dd655", size = 143570, upload-time = "2026-09-30T04:36:54.816Z" }, + { url = "https://files.pythonhosted.org/packages/81/84/9ebfc8ed6c8c4fcd8e726ff6bf220cc8deb3966e31dce9be8dd8aa017e64/charset_normalizer-3.5.2-cp314-cp314-win32.whl", hash = "sha256:4f87960d57feabfb618e4e0af6e7371645fa26a277860739d6e5d6e0012c92f0", size = 186412, upload-time = "2026-09-30T04:36:56.643Z" }, + { url = "https://files.pythonhosted.org/packages/d1/78/5ed86f743d4bc350db307e7636419a0a5ee1d91806d30c7f667bd5c80dae/charset_normalizer-3.5.2-cp314-cp314-win_amd64.whl", hash = "sha256:e4e81e09c1578b8df602e3db08b0b3ea0a6947ad612f52bf8dc5ea8d47691f0c", size = 210965, upload-time = "2026-09-30T04:36:58.205Z" }, + { url = "https://files.pythonhosted.org/packages/53/94/a3a7698e9b1a395e1eb99ccd9a324be9347973bff4e72db2a06496d7cd27/charset_normalizer-3.5.2-cp314-cp314-win_arm64.whl", hash = "sha256:80d02b6f04e92601a081dd97b23d3128033098bff5d35d392ddcc0476ea11253", size = 200406, upload-time = "2026-09-30T04:36:59.764Z" }, + { url = "https://files.pythonhosted.org/packages/c1/48/c5dd00d5ef7791f02666de250a5bb6071e29b7e133cf4b835800b6d3bc27/charset_normalizer-3.5.2-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:dca9ab98072a5a54ebacebdc45f53e645336b320c667410b061be1ca588ae709", size = 396871, upload-time = "2026-09-30T04:37:01.543Z" }, + { url = "https://files.pythonhosted.org/packages/12/c8/8379554b42e8368161d898476686947a0fdbd3e8865170d7909dcabfdee8/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f0aa869112ef88429ae17820d99c3dd9504c9e9c671d3c246f3d7442cb051084", size = 249711, upload-time = "2026-09-30T04:37:03.111Z" }, + { url = "https://files.pythonhosted.org/packages/4a/eb/2ddb1035d17320caa9f41682935123a9a250277b261c3efc86b2d2a21343/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c0afc6800ba57ccc350374c5bd6150419915d95ce93cdbab2d783d75eaf30ecb", size = 231146, upload-time = "2026-09-30T04:37:04.721Z" }, + { url = "https://files.pythonhosted.org/packages/4a/24/2ecb4bde104322cd7859d6594fcfa74649f8d90b3221c9feecbef149875b/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7dcd882da75ef9adf94903b1e3b9419e8aa8fb4c7396822b834b9ef7fb96954f", size = 271552, upload-time = "2026-09-30T04:37:06.295Z" }, + { url = "https://files.pythonhosted.org/packages/3f/98/9d5f6ebc3aee9fef5d30b4aff11fb2ab7a1222b4064f8ef2c7c87cde217a/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2e06a3a98f916dd41d27f3105e02e7a40181c98c94b9158733d03a6f80506c09", size = 269810, upload-time = "2026-09-30T04:37:07.905Z" }, + { url = "https://files.pythonhosted.org/packages/09/e1/a3b06a10461b1b7628853c934c644e03bc28e42767116afb52f19a56519b/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6bd128f206a7752ae1f2ab6c61bf8a24ba28913a10df8b14c2637b973ff97a80", size = 259845, upload-time = "2026-09-30T04:37:09.554Z" }, + { url = "https://files.pythonhosted.org/packages/fd/d3/6f561f74a296cf27d61775a1dc665ad13f3bff6a798810ca05907f37a7c4/charset_normalizer-3.5.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c8f3d67aeaf55f017982b73683f0e7342ba2f6635a78f69ce89ebb26aa411e5c", size = 252825, upload-time = "2026-09-30T04:37:11.274Z" }, + { url = "https://files.pythonhosted.org/packages/26/9f/69e13ca3b18f43e0eafcd34c04a45b732ae22a43b54a5fc9e119103356eb/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:fe9753dfee015c570d73df76f899f18444d41388bffcde097deba51c4fadbb9f", size = 252659, upload-time = "2026-09-30T04:37:12.941Z" }, + { url = "https://files.pythonhosted.org/packages/73/a9/ace29806a0dae18939919c76ba526472d83214afa101105fabff2cf30625/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:92888bb3187c5ba50500b00b3b310c9f2c651709d28036077680cb5255450a03", size = 238819, upload-time = "2026-09-30T04:37:14.659Z" }, + { url = "https://files.pythonhosted.org/packages/f8/c1/6116d52a2e3311ec80f21f5fb5e17b27405f10b9608af8f6e69516841a1b/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:d008d90a7f2471519aef0c90dfbe73b3e6e4d5e66ac48e19154c17e89e98b604", size = 272973, upload-time = "2026-09-30T04:37:16.346Z" }, + { url = "https://files.pythonhosted.org/packages/19/aa/9955c7e93bba10a9c7e8f7a5031b7ced66f3a1883a55c00712b8d5850ff3/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:31f3930700408d211f13378ccbe1c40845d8da54bd0681fac3a9b5aae81c7aa8", size = 253692, upload-time = "2026-09-30T04:37:18.212Z" }, + { url = "https://files.pythonhosted.org/packages/bb/33/2a6ae7fdc1b10cb581cef91addd8cdfc5f40d50abb5702309369d5834579/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:2a925889534b3748302dae5dead07cc13480de1dac3aea80a941b729b471ef93", size = 268757, upload-time = "2026-09-30T04:37:19.877Z" }, + { url = "https://files.pythonhosted.org/packages/a2/22/80992720a0282cd39bba1db35868e6b9c22f41281160143a836544bc1d8a/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f5ec61164adcec446f8969a3358ec3f9b26bbda3b9213e5586d219afa8df2915", size = 262220, upload-time = "2026-09-30T04:37:21.583Z" }, + { url = "https://files.pythonhosted.org/packages/92/9f/181fd07e1bffea1d95cd80c84ac537354f50699c22cfc4d3c02b6fc16208/charset_normalizer-3.5.2-cp314-cp314t-win32.whl", hash = "sha256:598a11a2c7ebaa5334bf698bf29568c9c390abac6a154d8170fedecd1cea38c5", size = 197797, upload-time = "2026-09-30T04:37:23.235Z" }, + { url = "https://files.pythonhosted.org/packages/49/1c/25d8415ec1c4f2f41f1680435e4c87cfb378ff2f677d950946f2a45d0632/charset_normalizer-3.5.2-cp314-cp314t-win_amd64.whl", hash = "sha256:7fdde2c9fd9e3eca40631e024664cf2584272cc8f96308cbe5fdfc930f51d8bc", size = 222765, upload-time = "2026-09-30T04:37:24.891Z" }, + { url = "https://files.pythonhosted.org/packages/3e/b4/46b48f013dadfc0d0d33b375438e31bdf5a989dc68389c6bf627054d4df9/charset_normalizer-3.5.2-cp314-cp314t-win_arm64.whl", hash = "sha256:d1befeed746d247c81127bb14de9dc3d30edb6e5976d34f83f86ed262b1d9105", size = 210985, upload-time = "2026-09-30T04:37:26.634Z" }, + { url = "https://files.pythonhosted.org/packages/ca/e9/34e597dee616d0b8ee4b34d29399e85c2204ade174157a48505d42baa4ff/charset_normalizer-3.5.2-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:87475fabc8d9996fd9c27debb395e642e8c838d78a00b6e932227a0e06b81e26", size = 367676, upload-time = "2026-09-30T04:37:28.329Z" }, + { url = "https://files.pythonhosted.org/packages/60/9f/a5d1c91c0263745e2cd344c5a4415d787c575501ab1d449f1148ac6b495d/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9409a8bf35cf78353942504b24a57de3d75b708997a1e4bd8db71ac8633ce364", size = 248414, upload-time = "2026-09-30T04:37:30.167Z" }, + { url = "https://files.pythonhosted.org/packages/26/79/e697f77464748a3ee3cf490c83d592459400d4898380d66c38366b03080c/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:498dc3188ca05a68231ac3fdbfc7f57eb67e1343c30e0fea17f8218c1599b253", size = 244775, upload-time = "2026-09-30T04:37:31.964Z" }, + { url = "https://files.pythonhosted.org/packages/ca/87/3d42a42e18ea066e2513936fd678a00696e77878b5ae04528976abdbcb83/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e242bb1c5e76e97dfa9e7f209a71e93a01d7f19ffdd5cfbb2e2d55b4f08f8ab0", size = 273877, upload-time = "2026-09-30T04:37:33.661Z" }, + { url = "https://files.pythonhosted.org/packages/c3/76/8a28136f3938ba9836f84280ce0c4d61ed1cf15a036b2034900c62634162/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:def79fa35ef0cef8d2accec024f4fdc7ead3012ff02f5215c783f39f03ef8cfc", size = 269455, upload-time = "2026-09-30T04:37:35.573Z" }, + { url = "https://files.pythonhosted.org/packages/a0/a1/4fbf5d0f0f1b2a080474c1cf9a2f12c4c6531bb0e8ba591055e846d2b4e9/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3df041de8887954562c9b261cba85ca0e9ded74048daf125f45edcfaa4832229", size = 257336, upload-time = "2026-09-30T04:37:37.397Z" }, + { url = "https://files.pythonhosted.org/packages/ba/a2/8b50aa320adb880ad579518e6f718f24944804b42a88b83d267d5d444125/charset_normalizer-3.5.2-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:04851f73ae72b8413dddadb16a49dfee95263553741fd42d546f7d66907e6be5", size = 257584, upload-time = "2026-09-30T04:37:39.522Z" }, + { url = "https://files.pythonhosted.org/packages/a5/57/50e3fed84e175f40349bd0da7a4fce94c87f0378f52d74f511d89e0bdc20/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:183b88127acdb4fabe59d951ab424faf1af7b63cdbb5f776186c1ea2ffcaed98", size = 251854, upload-time = "2026-09-30T04:37:41.23Z" }, + { url = "https://files.pythonhosted.org/packages/d6/54/f7fbb3493c9f49091213b9c2d6dd65800696f1ce1a3f196a4205f50417b1/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:16fa0eccf81304b79c5cd87f9271c3b85dd9dd99245e4422ae9c0dd45e0f99d3", size = 248767, upload-time = "2026-09-30T04:37:42.883Z" }, + { url = "https://files.pythonhosted.org/packages/d9/37/b3a6385acc5a1e45b39ae9c90bfb9cf838a09b9dd37ef2740ab4c6b4a2eb/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:7441d755b7ab94f8d4eb3e43ec05482d760842fd263d003a99102d742cd835e2", size = 274479, upload-time = "2026-09-30T04:37:44.658Z" }, + { url = "https://files.pythonhosted.org/packages/89/44/809913e2cfd279e635a9294fdbbfb1b1dc62a8189d473d561f649fce98d8/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:ca403d7e4798f525fdfc78e258820419cbbd0f0ecbab9de7840e3c017cf6b8cf", size = 258310, upload-time = "2026-09-30T04:37:46.529Z" }, + { url = "https://files.pythonhosted.org/packages/af/a2/f28400ab13359d91bd39179df8e149376b9bf36588e739a3a4f9de2b84b2/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:df29a0a7107f7011e77f4eebdddec4c7331e24d787a0b21a46d63bdf7445da95", size = 271100, upload-time = "2026-09-30T04:37:48.399Z" }, + { url = "https://files.pythonhosted.org/packages/e9/89/9bab37955edf0adb3b66f8a3a6617d9f2f487e0d56f295a6a286cb640aa6/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:f3c96f633825733f735c5a9cf21d21a257d8e1edf0b1cee0a064b9c424ca0f7d", size = 259936, upload-time = "2026-09-30T04:37:50.023Z" }, + { url = "https://files.pythonhosted.org/packages/23/b5/4459e08d45a679f903d50fea08bc52cfa728cca4d7bd02c757b5e5abda2e/charset_normalizer-3.5.2-cp315-cp315-win32.whl", hash = "sha256:281cb91036248400f4cc957495cccd44c275c2e0c5854f7e45ac5cf7dc193847", size = 186301, upload-time = "2026-09-30T04:37:51.722Z" }, + { url = "https://files.pythonhosted.org/packages/98/e8/55d5fd3935b4bce6da4fe0df61898e8c82653e317e677bd58aceb9c60f13/charset_normalizer-3.5.2-cp315-cp315-win_amd64.whl", hash = "sha256:89b53f3cda69831909888e0494f4fa0bcd3537e3e138dabeb620bd6ad946bae8", size = 210858, upload-time = "2026-09-30T04:37:53.427Z" }, + { url = "https://files.pythonhosted.org/packages/a9/5b/974423c2fd8e524c7a7f64318c1e02240ef954912fa2b4d70344107b9c68/charset_normalizer-3.5.2-cp315-cp315-win_arm64.whl", hash = "sha256:6be488a102b8cf28d0391d8c4ba7748938ae28b78ad901f8585520fca33ead1a", size = 200309, upload-time = "2026-09-30T04:37:55.015Z" }, + { url = "https://files.pythonhosted.org/packages/ee/f9/00ee0195db1013d8f7c416fd770fbeb560bb46eb2e36b054d05cb56f6cfa/charset_normalizer-3.5.2-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:915563965d418f986e7e145accc592eae9e1a1be3566ff98a05d7a9ec42a76e1", size = 395343, upload-time = "2026-09-30T04:37:56.743Z" }, + { url = "https://files.pythonhosted.org/packages/04/3a/c00b50e94c964cf934c7899cd47c97952fc11dad71cc5884b3c61795b09b/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:65cd72beeeca9d3aaea1201e5923859f308f952f9c71de93f06063c79f0f7a3b", size = 250114, upload-time = "2026-09-30T04:37:58.607Z" }, + { url = "https://files.pythonhosted.org/packages/50/27/d102dc880bbcffd0479ab64dfc1fb96777a854355a55e2bda72a71efadcb/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b7fd005a73d9e657273b7a10dc71a9e03c8fb9ee6999798d6918ce095b81ac7f", size = 239997, upload-time = "2026-09-30T04:38:00.511Z" }, + { url = "https://files.pythonhosted.org/packages/a5/4a/bf7ef45794dd293fab5f98a9309817977fbb845b9998f171b8cc5d8437a3/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e54da4baf05720032d527874d40b65fa4d7e5c6c6a43d0c3adbeffcaf275a2b3", size = 272313, upload-time = "2026-09-30T04:38:02.509Z" }, + { url = "https://files.pythonhosted.org/packages/e8/ee/008a2837737991474c5754bb3191010007663860979701990982a502cbaf/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:124fbf1a8ff966d87ae05bb8bd45a71f966055ed8bba320d0c7cf450bc5f4d0e", size = 269986, upload-time = "2026-09-30T04:38:04.435Z" }, + { url = "https://files.pythonhosted.org/packages/93/ad/bd74a283940dc910c5b14f8e4f80a248082bc9c0fcbe1f54530cb6d9cc5e/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:28b4f0d66fb834ff90f28209ac7bce77868c45d8c93e26f906709d9b7c2e1af9", size = 260202, upload-time = "2026-09-30T04:38:06.549Z" }, + { url = "https://files.pythonhosted.org/packages/8a/7b/ed341c66f69f688723501fac752be3d63c7159ca0d0d4174fc611e5710bb/charset_normalizer-3.5.2-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:58ca3755ee7ff7f59b57789ec9833c9de9ea275405cdd240eda1f193112e398a", size = 259083, upload-time = "2026-09-30T04:38:08.311Z" }, + { url = "https://files.pythonhosted.org/packages/cc/9d/e41588b777965e5031a43128a1e96173ebb35ac75fc53ec3b517e7c21cd4/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:443eae2bf318abeaf6f15d785138f71fd6de770e99a92158b8b814265e079115", size = 253081, upload-time = "2026-09-30T04:38:10.402Z" }, + { url = "https://files.pythonhosted.org/packages/81/35/b761eb6d8c1eb218b9b42b9b4d5ac902afdc399fb6dac6f9a9aac7bda589/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:58f361dcbab699cf8f42db3f47c8e7fd1036f138c23a5d08de9fde5f425a730c", size = 248712, upload-time = "2026-09-30T04:38:12.317Z" }, + { url = "https://files.pythonhosted.org/packages/4d/2c/147169a041b747759f37405c0a97157e8e92de967968373101ff14915cba/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:1b4cbc7c3491ccb4aa17fcd8165649d01cf39f76de1696da8631b5f71b85401d", size = 274176, upload-time = "2026-09-30T04:38:14.138Z" }, + { url = "https://files.pythonhosted.org/packages/f0/2d/0ff8db0d373ba8538db686db11cd7e8912031490b9e4f383b41912e8d594/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:ba0b1d2620edf869789c3879223f52bf2afc5d31b3cb47cc57b3a12c05e2aa9d", size = 259413, upload-time = "2026-09-30T04:38:15.841Z" }, + { url = "https://files.pythonhosted.org/packages/8a/8e/b4a085fb47c9d3a7e43576a4784fdd8fe23f907514a972de8086edaf7a48/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:5e2b6b57e9733d39f0c9fd3185efa6b8e29652c4cd8fe94180272cf6ed9a78c4", size = 269434, upload-time = "2026-09-30T04:38:17.626Z" }, + { url = "https://files.pythonhosted.org/packages/83/1c/d8d8d7322a7c3eecdf3237a4a419cf41d2eaad8e006ce7dfdd9d4c8fa2eb/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:51cf45226a9b588d0d2b4880c62d686934b63ab0bd79ca23ab0e9762eb27441b", size = 262716, upload-time = "2026-09-30T04:38:19.214Z" }, + { url = "https://files.pythonhosted.org/packages/a0/16/0e4c6ba9b44e97a2da150e52d331e8f9c968b21b358fbffa6c856cebcd89/charset_normalizer-3.5.2-cp315-cp315t-win32.whl", hash = "sha256:5fb29fb8cd1a46c27a1bf9613ad5ec2599310d46b4025d9556404a6b6a292800", size = 197159, upload-time = "2026-09-30T04:38:21.037Z" }, + { url = "https://files.pythonhosted.org/packages/be/33/e90bc2b1374f7f36ef106f56620de5a783907e19ca857efe2277e31cac3e/charset_normalizer-3.5.2-cp315-cp315t-win_amd64.whl", hash = "sha256:a192e2c40070d92c3ccf777e3a5c4ff515573cd2bb7ed0c537fdadbbec5bbf21", size = 221322, upload-time = "2026-09-30T04:38:22.886Z" }, + { url = "https://files.pythonhosted.org/packages/66/89/dfa6dcb08c200b7830ab56439e8c1890f2971d51aafbb3937894a2e7fcfc/charset_normalizer-3.5.2-cp315-cp315t-win_arm64.whl", hash = "sha256:749e97e1b32313717a565abbe321bc2190bc8b35f1a67e4cdbc7c56c8d8ffe58", size = 209192, upload-time = "2026-09-30T04:38:24.648Z" }, + { url = "https://files.pythonhosted.org/packages/8c/ab/176fbfd5b64939c55d652366aa5b9ef1d767af207a3aa6ebeb0d226c484d/charset_normalizer-3.5.2-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:4275811936e2f06feff5e598fb42a1b7ae852da8e39605211892b56b81a34efd", size = 331815, upload-time = "2026-09-30T04:38:26.216Z" }, + { url = "https://files.pythonhosted.org/packages/7e/84/371eac6b30bdbcbf2d632a1a01809103459216fcaae61b8b8d922c1bfb8a/charset_normalizer-3.5.2-cp37-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1c50fe28bbc2ced33386f298650d91218076c05420e6cbd790b913adc41659e7", size = 253276, upload-time = "2026-09-30T04:38:28.032Z" }, + { url = "https://files.pythonhosted.org/packages/43/6f/c4fbae58febff71709c51bc7e18fdfa55341dc382704740f9f0cbf03817b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d19fbd981a488e22cd04883659ca6b08f50b5974f9fd7c95655ef6a043e5893f", size = 241239, upload-time = "2026-09-30T04:38:29.732Z" }, + { url = "https://files.pythonhosted.org/packages/61/71/458c3f42164a07d0c5210798e9e704b39e540a6793b05aba67f3a35243a9/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0fed1d06615f022ee3b13caf5e8b180cfea32bb2c5aded8a9d44277afc040f93", size = 231121, upload-time = "2026-09-30T04:38:31.462Z" }, + { url = "https://files.pythonhosted.org/packages/09/54/ab9e89367076f6331bb6c65c4bf14a5361fa5191cb6561bf534f18504e1b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:838dcc90063569a0448120554591a1d6c4a4ffe11babf048908793154ab86ade", size = 260350, upload-time = "2026-09-30T04:38:33.239Z" }, + { url = "https://files.pythonhosted.org/packages/7c/c1/061431ecc688d9d76602502cb57cc01e691e682c18f1beb45f9673b5bbd2/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2ce45c6627b22c47e390bc91a41c3d13032192e699fa0bea96e9671b373d69b0", size = 255430, upload-time = "2026-09-30T04:38:34.865Z" }, + { url = "https://files.pythonhosted.org/packages/8d/1f/20c8949f0676f7ab811abdeb7f4d7f1cbc6e61ff20bef08b44edeb092bc8/charset_normalizer-3.5.2-cp37-abi3-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0774bf9bf620249fee3e0b8b9fd3065de213be30f3aa94ce2494b3b638949e26", size = 250612, upload-time = "2026-09-30T04:38:36.649Z" }, + { url = "https://files.pythonhosted.org/packages/2b/9e/46f2fa4c431fc98c4ae76a8cb5bdca54e0341e3cfc3fcfd8e82740250818/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:1db38f4c5496827c1a501846d64d14c3b80c7e6714e406cd7dc36a9899fa1011", size = 242083, upload-time = "2026-09-30T04:38:38.26Z" }, + { url = "https://files.pythonhosted.org/packages/bd/39/559be29a0c0f086e0bba6922babd38916cc5e0b58ced4de13ee01ea05508/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:304d8e4d493af723536393eee0c689eb7813f4a474c8b479dee63f1fdd98f621", size = 232738, upload-time = "2026-09-30T04:38:39.81Z" }, + { url = "https://files.pythonhosted.org/packages/ff/6c/387b0e4f756a282831c1d9fc6aeb6c51ca4507ca202767c8de15ce9b12e2/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:9b7f416ff0978e2f2249330527f0ad6fa02f4932e6199692d3b52da2048c19e4", size = 260703, upload-time = "2026-09-30T04:38:41.346Z" }, + { url = "https://files.pythonhosted.org/packages/96/92/1fdf015f09ef449f50d3ac4b67c90887c9c318b727daa95cc4f866e6521d/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:01077390b03f7988f11d700a2194e69b119741a86b1a638b1db88891e3eced8e", size = 247622, upload-time = "2026-09-30T04:38:42.937Z" }, + { url = "https://files.pythonhosted.org/packages/dc/3c/8e7b8a5671ad5d433669fb2a76f1a0164df2d9b1718b0206bc2a16d840cc/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_s390x.whl", hash = "sha256:7e841fb9010836c992c9f12fcbd43a831de93a5f726fc1ccd8ca1d0268c5014c", size = 257500, upload-time = "2026-09-30T04:38:44.604Z" }, + { url = "https://files.pythonhosted.org/packages/b4/f0/45b579df5cabc1d5d53ea1cc35e8437d3ca768c0acccc7041517cb6fbb32/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:9cae88599c7219005d879f98e5ed53341e9a122af585e1091200358a3003d2a0", size = 255100, upload-time = "2026-09-30T04:38:46.289Z" }, + { url = "https://files.pythonhosted.org/packages/31/68/fdec18a343f5fb3f310588dd478b09ac4799e0b187dbade3a8cd776f03ef/charset_normalizer-3.5.2-cp37-abi3-win32.whl", hash = "sha256:01b0c0d2262a9e28e8484a278c7e1b5d650e3ac8cf2683d2967e25899f208bdf", size = 174499, upload-time = "2026-09-30T04:38:47.999Z" }, + { url = "https://files.pythonhosted.org/packages/9d/8a/b618149cc5207943a0242068d7a27897f56a62947b5a039085f2a22029f8/charset_normalizer-3.5.2-cp37-abi3-win_amd64.whl", hash = "sha256:9f56f72050826f63dcee7a7f55b0a77168cb3bfc553fd405e7f8f9ece75a4036", size = 200092, upload-time = "2026-09-30T04:38:49.707Z" }, + { url = "https://files.pythonhosted.org/packages/03/cf/4c66866fa9e2b1c78e3c911516d1de497a677b7ac60f1eceda74ce777ca3/charset_normalizer-3.5.2-cp37-abi3-win_arm64.whl", hash = "sha256:40ab6bffa02ae10a0581e6c198be7d2d8ca5c2a0c64e4ed3465d766df457573e", size = 294363, upload-time = "2026-09-30T04:38:51.312Z" }, + { url = "https://files.pythonhosted.org/packages/fc/ad/d07d7862a62ffa6d79d68074d14823243dd235a77c45262acbf6adeb28bf/charset_normalizer-3.5.2-py3-none-any.whl", hash = "sha256:b6b751274acb69d77b3323d6b7dbaa3c7fdfc1eb829b7eb61d262f32e1af9685", size = 68872, upload-time = "2026-09-30T04:39:21.828Z" }, +] + [[package]] name = "click" version = "8.5.0" @@ -394,6 +566,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/02/08/9c41fb51ab5b43eb21674aff13df270e8ba6c4b29c8624e328dc7a9482af/distlib-0.4.3-py2.py3-none-any.whl", hash = "sha256:4b0ce306c966eb73bc3a7b6abad017c556dadd92c44701562cd528ac7fde4d5b", size = 470628, upload-time = "2026-06-12T08:04:50.506Z" }, ] +[[package]] +name = "distro" +version = "1.9.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz", hash = "sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed", size = 60722, upload-time = "2023-12-24T09:54:32.31Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/12/b3/231ffd4ab1fc9d679809f356cebee130ac7daa00d6d6f3206dd4fd137e9e/distro-1.9.0-py3-none-any.whl", hash = "sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2", size = 20277, upload-time = "2023-12-24T09:54:30.421Z" }, +] + [[package]] name = "exceptiongroup" version = "1.3.1" @@ -584,6 +765,7 @@ dependencies = [ { name = "certifi" }, { name = "mcp" }, { name = "packaging" }, + { name = "posthog" }, { name = "pydantic" }, { name = "starlette" }, { name = "tomli", marker = "python_full_version < '3.11'" }, @@ -619,6 +801,7 @@ requires-dist = [ { name = "httpx", marker = "extra == 'dev'", specifier = ">=0.27.0" }, { name = "mcp", specifier = ">=2,<3" }, { name = "packaging", specifier = ">=23.0.0" }, + { name = "posthog", specifier = ">=3,<5" }, { name = "pydantic", specifier = ">=2.0.0" }, { name = "pytest", marker = "extra == 'dev'", specifier = ">=8" }, { name = "pytest-asyncio", marker = "extra == 'dev'", specifier = ">=0.23" }, @@ -674,6 +857,23 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, ] +[[package]] +name = "posthog" +version = "4.10.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "backoff" }, + { name = "distro" }, + { name = "python-dateutil", version = "3.0.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, + { name = "python-dateutil", version = "4.0.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "requests" }, + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d1/3d/7fed38dfcc178c198b2c903dfda7011f35eea52455fd5333216d32db3be0/posthog-4.10.0.tar.gz", hash = "sha256:513bfbb21344013294abc046b1142173189c5422a3906cf2280d1389b0c2e28b", size = 85178, upload-time = "2025-06-13T19:36:26.24Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/85/c7/d8820c1040118919d0776d8c66ca091b503a574234571a69ff151e7c4072/posthog-4.10.0-py3-none-any.whl", hash = "sha256:b693d3d8209d000d8c5f4d6ea19096bfdfb83047fa8a14c937ae50a3394809a1", size = 102475, upload-time = "2025-06-13T19:36:24.839Z" }, +] + [[package]] name = "pycparser" version = "3.0" @@ -911,6 +1111,39 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/fa/b6/3127540ecdf1464a00e5a01ee60a1b09175f6913f0644ac748494d9c4b21/pytest_timeout-2.4.0-py3-none-any.whl", hash = "sha256:c42667e5cdadb151aeb5b26d114aff6bdf5a907f176a007a30b940d3d865b5c2", size = 14382, upload-time = "2025-05-05T19:44:33.502Z" }, ] +[[package]] +name = "python-dateutil" +version = "3.0.0" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version < '3.11'", +] +dependencies = [ + { name = "six" }, + { name = "tzdata" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/0e/df/f15f80383f152452d8985b36d95cb8751f901a3e0ff4cd27f7e118f168e2/python_dateutil-3.0.0.tar.gz", hash = "sha256:7ebcb3c29a92f3ceafe79a7a48a5c45677e9e004bbeec5742ac0bbb00560b7a2", size = 271066, upload-time = "2026-10-21T23:41:45.075Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5a/17/cebee01d1c0c1441174cf0456ddc91b280d79acb65340c05e41d77866ee8/python_dateutil-3.0.0-py2.py3-none-any.whl", hash = "sha256:3c79630202e4152c6add678446984236efe4f57e84d8e892aab0637bab82e9fd", size = 94659, upload-time = "2026-10-21T23:41:43.431Z" }, +] + +[[package]] +name = "python-dateutil" +version = "4.0.0" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.14'", + "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'emscripten'", + "python_full_version == '3.11.*' or (python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform != 'emscripten')", +] +dependencies = [ + { name = "tzdata" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/18/39/b3927f3616f6223832f9b760e4208e8a7c7e1dea2b4d9ad7d32a5d214c3a/python_dateutil-4.0.0.tar.gz", hash = "sha256:d7295ff14fdc0f92f662100bfb6c551d160ca090f2939f1ec5b9794265c03f06", size = 250419, upload-time = "2026-11-01T07:02:42.426Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2f/a9/52b89563d154433d79b51ed1eb4842bf7334cb2696891a7fe135618853d7/python_dateutil-4.0.0-py3-none-any.whl", hash = "sha256:a5e246f79eb80475e691bf93862cead98decd8a498cf53ba0516fcdc0f50dc1c", size = 92853, upload-time = "2026-11-01T07:02:40.797Z" }, +] + [[package]] name = "python-discovery" version = "1.6.0" @@ -992,6 +1225,21 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/2c/58/ca301544e1fa93ed4f80d724bf5b194f6e4b945841c5bfd555878eea9fcb/referencing-0.37.0-py3-none-any.whl", hash = "sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231", size = 26766, upload-time = "2025-10-13T15:30:47.625Z" }, ] +[[package]] +name = "requests" +version = "2.34.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "certifi" }, + { name = "charset-normalizer" }, + { name = "idna" }, + { name = "urllib3" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ac/c3/e2a2b89f2d3e2179abd6d00ebd70bff6273f37fb3e0cc209f48b39d00cbf/requests-2.34.2.tar.gz", hash = "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed", size = 142856, upload-time = "2026-05-14T19:25:27.735Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl", hash = "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0", size = 73075, upload-time = "2026-05-14T19:25:26.443Z" }, +] + [[package]] name = "rpds-py" version = "0.30.0" @@ -1254,6 +1502,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ef/55/6dc6d6bb953bdfc52519a0059592c52b6e3b8ad51cf8256dffceb55b0610/setuptools-84.2.1-py3-none-any.whl", hash = "sha256:ca140b45d5325a9478f880e351484f62fef15f336462e449ca0c03c873d589c2", size = 876263, upload-time = "2026-10-20T19:01:35.678Z" }, ] +[[package]] +name = "six" +version = "1.17.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031, upload-time = "2024-12-04T17:35:28.174Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" }, +] + [[package]] name = "sse-starlette" version = "3.4.11" @@ -1396,6 +1653,24 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/67/81/4add07e5172b7ac40d8ed5ff580409a7801a4fe26d529bdd915401dabfbe/typing_inspection-0.4.4-py3-none-any.whl", hash = "sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147", size = 14750, upload-time = "2026-08-12T12:37:24.648Z" }, ] +[[package]] +name = "tzdata" +version = "2026.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7a/29/6a1391d31cd00ff9e927215a224a880e1e84e826b64ba80a499e51c074d8/tzdata-2026.6.tar.gz", hash = "sha256:85d2cd9c09f81f0bb29db27759fc83af4f1e620efb814f8c5bf8b4cc4feece6d", size = 201017, upload-time = "2026-10-28T09:57:09.137Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0a/66/9a06c2227fedfd4919f0eaaa8b94377d9730882a7e4f95823c9a331ab5e1/tzdata-2026.6-py2.py3-none-any.whl", hash = "sha256:0a10eec6e13ef16b627fabed9a5f2ba61a62b1c67f327305f4e7e412a70b4aec", size = 348210, upload-time = "2026-10-28T09:57:07.276Z" }, +] + +[[package]] +name = "urllib3" +version = "2.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e3/05/b17359e1cefb4f909b5e40b1b90a496d987258916dbbf88e842c729f510e/urllib3-2.8.0.tar.gz", hash = "sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63", size = 458972, upload-time = "2026-09-15T19:29:36.253Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/92/9d/c4e665119135114480843e7ab388fa94d8480650450e6f8e26b70d323a4c/urllib3-2.8.0-py3-none-any.whl", hash = "sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", size = 135717, upload-time = "2026-09-15T19:29:34.577Z" }, +] + [[package]] name = "uvicorn" version = "0.52.4" From 208f8c6d2c851b4c28f06208699f1fcce3b0dce3 Mon Sep 17 00:00:00 2001 From: manish-wekan Date: Fri, 6 Nov 2026 16:16:27 +0530 Subject: [PATCH 2/7] Add opt-out PostHog telemetry module and analytics docs. Co-Authored-By: Claude Opus 5.5 --- .env.example | 9 ++ README.md | 6 + docs/analytics-events.md | 39 +++++ nitrostack/cli/telemetry.py | 290 ++++++++++++++++++++++++++++++++++++ 4 files changed, 344 insertions(+) create mode 100644 .env.example create mode 100644 docs/analytics-events.md create mode 100644 nitrostack/cli/telemetry.py diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..fb4e7d9 --- /dev/null +++ b/.env.example @@ -0,0 +1,9 @@ +# NitroStack Python SDK / CLI — optional analytics (see docs/analytics-events.md) +# PostHog project API key for the CLI/SDK product (never commit real values). +NITROSTACK_POSTHOG_API_KEY= +# PostHog ingest host (default matches US Cloud). +NITROSTACK_POSTHOG_HOST=https://us.i.posthog.com +# production | staging | development (default: inferred from NODE_ENV / CI). +NITROSTACK_ENVIRONMENT= +# Set to 0/false/off to disable CLI telemetry (DO_NOT_TRACK=1 also disables). +NITROSTACK_TELEMETRY= diff --git a/README.md b/README.md index 2f4226c..a6c007a 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,8 @@ Once scaffolded, follow the next steps printed by the CLI to run your server, co The CLI is installed with the SDK (`nitrostack-py`, or `python -m nitrostack.cli.main`). Run `nitrostack-py --help` to list commands. +**Optional usage telemetry** — When `NITROSTACK_POSTHOG_API_KEY` is set, the CLI can send anonymous usage events to PostHog (same CLI/SDK project as the TypeScript CLI). It is off without that key, when `DO_NOT_TRACK=1`, or when `NITROSTACK_TELEMETRY=0`. See [`docs/analytics-events.md`](docs/analytics-events.md) for the event list and properties. + ### Project lifecycle ```bash @@ -265,6 +267,10 @@ The SDK reads standard settings from the environment or `.env` files: | `NITROSTACK_LOG_LEVEL` | Log level (`DEBUG`, `INFO`, `WARNING`, `ERROR`). | | `NITROSTACK_LOG_TO_STDOUT` | Set to `true` to allow logging to stdout under stdio transport (Caution: may corrupt protocol stream). | | `NITROSTACK_HTTP_DEBUG` | Set to `1` to log every HTTP request (method, path, headers, body) and response status to stderr. Use when diagnosing a client that fails to connect: uvicorn's access log shows neither headers nor timestamps. | +| `NITROSTACK_POSTHOG_API_KEY` | Optional. PostHog project API key for CLI telemetry (see `docs/analytics-events.md`). Empty/unset disables capture. | +| `NITROSTACK_POSTHOG_HOST` | PostHog ingest host (default `https://us.i.posthog.com`). | +| `NITROSTACK_ENVIRONMENT` | `production`, `staging`, or `development` for analytics super-properties. | +| `NITROSTACK_TELEMETRY` | Set to `0` / `false` / `off` to disable CLI telemetry (in addition to `DO_NOT_TRACK=1`). | ### Keeping secrets out of logs (`SecretValue`) diff --git a/docs/analytics-events.md b/docs/analytics-events.md new file mode 100644 index 0000000..cd465f6 --- /dev/null +++ b/docs/analytics-events.md @@ -0,0 +1,39 @@ +# NitroStack Python SDK CLI — analytics events + +Telemetry is **opt-in by configuration**: set `NITROSTACK_POSTHOG_API_KEY` to enable. It is **off** when the key is unset, when `DO_NOT_TRACK=1`, when `NITROSTACK_TELEMETRY=0` (or `false`/`off`/`no`), during pytest (`PYTEST_CURRENT_TEST`), and in CI unless you explicitly enable it. + +## Super properties + +Sent on every captured event: + +| Property | Description | +|----------|-------------| +| `product` | `python_sdk` | +| `surface` | `terminal` | +| `environment` | `production`, `staging`, or `development` (from `NITROSTACK_ENVIRONMENT` or heuristics) | +| `app_version` | Installed `nitrostack` package version | +| `python_version` | Interpreter version | +| `sdk_version` | Same as `app_version` | +| `os_platform` | `sys.platform` | +| `os_arch` | `platform.machine()` | + +## Events + +| Event | When | Properties | +|-------|------|------------| +| `cli_command_invoked` | Every subcommand after parse | `command`: subcommand name (`init`, `pack`, …) | +| `cli_init_completed` | `init` finishes successfully | `template`, `skip_install`, `duration_ms`, `has_custom_description` | +| `cli_login_completed` | After `nitrostack-py login` succeeds (identity helper) | `user_email`, `cloud_user_id` (+ super properties) | +| `cli_deploy_completed` | `pack` writes a valid wheel | none beyond super properties | +| `cli_deploy_failed` | `pack` raises before success | `error_code`: exception type name (truncated) | + +## Identity + +- **Anonymous:** distinct id = first 16 hex chars of SHA-256(`hostname`:`username`), same scheme as the TypeScript CLI. +- **Login:** `login` runs `alias(anonymous, user_id)`, `identify(user_id, { email })`, optional `group_identify('organization', org_id)`, then `cli_login_completed`. Subsequent events use the Cloud user id as distinct id. + +## Code locations + +- Module: `nitrostack/cli/telemetry.py` +- CLI wiring: `nitrostack/cli/main.py` (`track_command_invoked`, `init`, `login`, `shutdown_telemetry`) +- Deploy: `nitrostack/cli/pack.py` (`cli_deploy_*`) diff --git a/nitrostack/cli/telemetry.py b/nitrostack/cli/telemetry.py new file mode 100644 index 0000000..4a6ee1e --- /dev/null +++ b/nitrostack/cli/telemetry.py @@ -0,0 +1,290 @@ +"""Opt-out PostHog telemetry for the NitroStack Python CLI (`nitrostack-py`). + +Non-blocking: events are queued by the PostHog SDK; call :func:`shutdown_telemetry` +at process exit (short flush timeout). Never raises into user command paths. +""" + +from __future__ import annotations + +import atexit +import hashlib +import logging +import os +import platform +import socket +import sys +import threading +from importlib import metadata +from pathlib import Path +from typing import Any, Dict, Mapping, Optional + +logger = logging.getLogger(__name__) + +PRODUCT = "python_sdk" +SURFACE = "terminal" + +_TRUE = frozenset({"1", "true", "yes", "on"}) +_FALSE = frozenset({"0", "false", "no", "off"}) + +_POSTHOG_LOCK = threading.Lock() +_client: Any = None +_anonymous_distinct_id: Optional[str] = None +_distinct_id_override: Optional[str] = None +_shutdown_done = False + + +def _env_truthy(name: str) -> bool: + v = (os.environ.get(name) or "").strip().lower() + return v in _TRUE + + +def _env_falsy(name: str) -> bool: + v = (os.environ.get(name) or "").strip().lower() + return v in _FALSE + + +def is_telemetry_disabled() -> bool: + """True when capture must not run (opt-out, tests, CI, or missing configuration).""" + if _env_truthy("DO_NOT_TRACK") or _env_truthy("PYTEST_CURRENT_TEST"): + return True + if _env_falsy("NITROSTACK_TELEMETRY"): + return True + if (os.environ.get("NITROSTACK_TELEMETRY") or "").strip() == "": + if _env_truthy("CI") or os.environ.get("GITHUB_ACTIONS"): + return True + key = (os.environ.get("NITROSTACK_POSTHOG_API_KEY") or "").strip() + if not key: + return True + return False + + +def _sdk_version() -> str: + try: + return metadata.version("nitrostack") + except metadata.PackageNotFoundError: + return "unknown" + + +def _runtime_environment() -> str: + explicit = (os.environ.get("NITROSTACK_ENVIRONMENT") or "").strip().lower() + if explicit in ("production", "staging", "development"): + return explicit + node_env = (os.environ.get("NODE_ENV") or "").lower() + if _env_truthy("NITROSTACK_PRODUCTION") or node_env == "production": + return "production" + if (os.environ.get("ENVIRONMENT") or "").strip().lower() == "staging": + return "staging" + return "development" + + +def _anonymous_id_from_machine() -> str: + global _anonymous_distinct_id + if _anonymous_distinct_id is not None: + return _anonymous_distinct_id + try: + user = os.environ.get("USER") or os.environ.get("USERNAME") or "unknown" + raw = f"{socket.gethostname()}:{user}".encode("utf-8", errors="replace") + _anonymous_distinct_id = hashlib.sha256(raw).hexdigest()[:16] + except Exception: + _anonymous_distinct_id = "anonymous" + return _anonymous_distinct_id + + +def get_distinct_id() -> str: + """Current analytics distinct id (Cloud user id after login, else anonymous hash).""" + if _distinct_id_override: + return _distinct_id_override + return _anonymous_id_from_machine() + + +def _super_properties() -> Dict[str, Any]: + return { + "product": PRODUCT, + "surface": SURFACE, + "environment": _runtime_environment(), + "app_version": _sdk_version(), + "python_version": platform.python_version(), + "sdk_version": _sdk_version(), + "os_platform": sys.platform, + "os_arch": platform.machine() or "unknown", + } + + +def _get_client() -> Any: + global _client + if is_telemetry_disabled(): + return None + with _POSTHOG_LOCK: + if _client is None: + from posthog import Posthog + + api_key = (os.environ.get("NITROSTACK_POSTHOG_API_KEY") or "").strip() + host = (os.environ.get("NITROSTACK_POSTHOG_HOST") or "https://us.i.posthog.com").strip() + _client = Posthog( + api_key, + host=host, + flush_at=10, + flush_interval=0.5, + ) + return _client + + +def track_event(event: str, properties: Optional[Mapping[str, Any]] = None) -> None: + """Fire-and-forget capture; swallowed on failure.""" + if is_telemetry_disabled(): + return + client = _get_client() + if client is None: + return + props: Dict[str, Any] = dict(_super_properties()) + if properties: + props.update(dict(properties)) + try: + client.capture(distinct_id=get_distinct_id(), event=event, properties=props) + except Exception: + logger.debug("nitrostack telemetry: capture failed", exc_info=True) + + +def track_command_invoked(command: str) -> None: + track_event("cli_command_invoked", {"command": command}) + + +def track_init_completed( + *, + template: str, + skip_install: bool, + duration_ms: int, + has_custom_description: bool, +) -> None: + track_event( + "cli_init_completed", + { + "template": template, + "skip_install": skip_install, + "duration_ms": duration_ms, + "has_custom_description": has_custom_description, + }, + ) + + +def track_deploy_completed() -> None: + track_event("cli_deploy_completed", {}) + + +def track_deploy_failed(*, error_code: str) -> None: + track_event("cli_deploy_failed", {"error_code": error_code}) + + +def identify_from_cloud_login( + *, + user_id: str, + email: str, + organization_id: Optional[str] = None, +) -> None: + """Alias anonymous device id to Cloud user id, identify, optional org group, then journey event. + + Call when a future `login` flow succeeds, matching intended TS CLI behaviour (#9). + """ + global _distinct_id_override + if is_telemetry_disabled(): + return + client = _get_client() + if client is None: + return + anonymous = _anonymous_id_from_machine() + uid = (user_id or "").strip() + em = (email or "").strip() + if not uid or not em: + return + props = _super_properties() + props["user_email"] = em + props["cloud_user_id"] = uid + try: + client.alias(previous_id=anonymous, distinct_id=uid) + client.identify(distinct_id=uid, properties={"email": em}) + if organization_id: + client.group_identify( + "organization", + organization_id, + properties={}, + distinct_id=uid, + ) + _distinct_id_override = uid + client.capture( + distinct_id=uid, + event="cli_login_completed", + properties={ + **props, + "user_email": em, + "cloud_user_id": uid, + }, + ) + except Exception: + logger.debug("nitrostack telemetry: identify/login failed", exc_info=True) + + +def _config_dir() -> Path: + if sys.platform == "win32": + base = os.environ.get("LOCALAPPDATA") or os.environ.get("APPDATA") + if base: + return Path(base) / "NitroStack" + return Path.home() / ".config" / "nitrostack" + + +def _first_run_flag_path() -> Path: + return _config_dir() / ".telemetry_first_run_notice_shown" + + +def maybe_print_first_run_notice() -> None: + """One-line notice on first CLI invocation (when telemetry may send).""" + if is_telemetry_disabled(): + return + path = _first_run_flag_path() + try: + if path.exists(): + return + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text("1\n", encoding="utf-8") + except OSError: + return + msg = ( + "NitroStack: anonymous usage telemetry is enabled. " + "Disable with DO_NOT_TRACK=1 or NITROSTACK_TELEMETRY=0.\n" + ) + try: + sys.stderr.write(msg) + sys.stderr.flush() + except OSError: + pass + + +def shutdown_telemetry(timeout: float = 2.0) -> None: + """Flush queued events without blocking the user indefinitely.""" + global _client, _shutdown_done + if _shutdown_done: + return + _shutdown_done = True + c = _client + if c is None: + return + + def _run() -> None: + try: + c.shutdown() + except Exception: + logger.debug("nitrostack telemetry: shutdown failed", exc_info=True) + + t = threading.Thread(target=_run, name="nitrostack-telemetry-shutdown", daemon=True) + t.start() + t.join(timeout=timeout) + + +def _atexit_shutdown() -> None: + if is_telemetry_disabled(): + return + shutdown_telemetry() + + +# Avoid duplicate handlers under pytest reloads; tests call shutdown explicitly. +if not os.environ.get("PYTEST_CURRENT_TEST"): + atexit.register(_atexit_shutdown) From 3eba809607a74b33399e00782668c0aa547ca7fb Mon Sep 17 00:00:00 2001 From: manish-wekan Date: Fri, 6 Nov 2026 16:16:27 +0530 Subject: [PATCH 3/7] Wire CLI events: commands, init, pack deploy, login identity. Co-Authored-By: Claude Opus 5.5 --- nitrostack/cli/main.py | 201 ++++++++++++++++++++++------------ nitrostack/cli/pack.py | 51 +++++---- tests/test_telemetry.py | 236 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 398 insertions(+), 90 deletions(-) create mode 100644 tests/test_telemetry.py diff --git a/nitrostack/cli/main.py b/nitrostack/cli/main.py index 96df123..ae04bee 100644 --- a/nitrostack/cli/main.py +++ b/nitrostack/cli/main.py @@ -1,16 +1,24 @@ +import argparse import os import re -import sys -import argparse import shutil import subprocess +import sys import time from pathlib import Path -from nitrostack.cli.generate import generate_component, generate_module as generate_module_from_template +from nitrostack.cli.generate import generate_component +from nitrostack.cli.generate import generate_module as generate_module_from_template from nitrostack.cli.install import install_dependencies, lock_with_uv, rewrite_pyproject_identity from nitrostack.cli.pack import pack_project from nitrostack.cli.skills import run_skills_flow +from nitrostack.cli.telemetry import ( + identify_from_cloud_login, + maybe_print_first_run_notice, + shutdown_telemetry, + track_command_invoked, + track_init_completed, +) from nitrostack.cli.upgrade import upgrade_project from nitrostack.cli.validators import format_report, validate_project @@ -1267,6 +1275,7 @@ def _add_port_flags(parser): def init_project(name: str = None, template: str = None, skip_install: bool = False, port=None, widget=None, force: bool = False): print_banner() + init_started = time.monotonic() # 1. Project name — optional CLI arg, otherwise the next readline if not name: @@ -1437,6 +1446,13 @@ def init_project(name: str = None, template: str = None, skip_install: bool = Fa else: print(" Try search_tools with 'overdue invoices', then invoke it through call_tool") print("\nHappy coding! 🚀\n") + duration_ms = int((time.monotonic() - init_started) * 1000) + track_init_completed( + template=template, + skip_install=skip_install, + duration_ms=duration_ms, + has_custom_description=description.strip() != "My awesome MCP server", + ) return if template == "python-oauth": print(" 2. Configure OAuth credentials in your \033[34m.env\033[0m file") @@ -1453,6 +1469,22 @@ def init_project(name: str = None, template: str = None, skip_install: bool = Fa print(" 6. NitroStudio cannot folder-connect a Python project (it looks for @nitrostack/core).") print(" Use Inspector HTTP as above, or Studio's custom MCP URL if it offers Streamable HTTP.") print("\nHappy coding! 🚀\n") + duration_ms = int((time.monotonic() - init_started) * 1000) + track_init_completed( + template=template, + skip_install=skip_install, + duration_ms=duration_ms, + has_custom_description=description.strip() != "My awesome MCP server", + ) + +def run_login(user_id: str, email: str, org_id: str | None = None): + """Associate the anonymous CLI distinct id with a NitroCloud user (analytics).""" + identify_from_cloud_login( + user_id=(user_id or "").strip(), + email=(email or "").strip(), + organization_id=(org_id or "").strip() or None, + ) + def run_dev(port=None, widget=None): target = "main.py" @@ -1513,9 +1545,9 @@ def cleanup(): try: start_process() - + watched_extensions = {".py", ".env"} - + def get_mtimes(): mtimes = {} for root, dirs, files in os.walk("."): @@ -1535,7 +1567,7 @@ def get_mtimes(): try: from watchfiles import watch print("Using watchfiles for high-performance file monitoring.") - + while True: for changes in watch("."): should_restart = False @@ -1549,11 +1581,11 @@ def get_mtimes(): if should_restart: print("File changes detected! Restarting server...") start_process() - + time.sleep(0.5) if process and process.poll() is not None: print("Server process exited. Waiting for file changes to restart...") - + except ImportError: print("watchfiles library not found. Falling back to standard polling...") last_mtimes = get_mtimes() @@ -1673,7 +1705,7 @@ def generate_module(name: str): def get_claude_config_paths(): paths = [] home = os.path.expanduser("~") - + # Windows if sys.platform == "win32": appdata = os.environ.get("APPDATA") @@ -1696,24 +1728,24 @@ def get_claude_config_paths(): # Linux else: paths.append(os.path.join(home, ".config", "Claude", "claude_desktop_config.json")) - + return [p for p in paths if os.path.exists(os.path.dirname(p))] def register_server(name: str, file_path: str): import json - + if not os.path.exists(file_path): print(f"Error: Script file '{file_path}' does not exist.") sys.exit(1) - + server_entry = _build_server_entry(file_path) - + config_paths = get_claude_config_paths() if not config_paths: print("Error: Could not find any Claude Desktop installation directories.") print("Please ensure Claude Desktop is installed on your machine.") sys.exit(1) - + registered_any = False for path in config_paths: try: @@ -1726,22 +1758,22 @@ def register_server(name: str, file_path: str): config = json.loads(content) except json.JSONDecodeError: print(f"Warning: Configuration file at '{path}' is not valid JSON. Resetting it.") - + if "mcpServers" not in config: config["mcpServers"] = {} - + config["mcpServers"][name] = server_entry - + # Create directory if needed os.makedirs(os.path.dirname(path), exist_ok=True) with open(path, "w", encoding="utf-8") as f: json.dump(config, f, indent=2) - + print(f"Successfully registered server '{name}' in: {path}") registered_any = True except Exception as e: print(f"Error writing to config at '{path}': {e}") - + if registered_any: print("\nAll done! Please fully restart Claude Desktop to load your new server.") else: @@ -1958,62 +1990,95 @@ def main(): help="Lint project config, @mcp_app imports, and @module() class references", ) + login_parser = subparsers.add_parser( + "login", + help=( + "Record NitroCloud user identity for analytics " + "(alias anonymous id to Cloud user id)" + ), + ) + login_parser.add_argument( + "--user-id", + required=True, + dest="user_id", + help="Stable NitroCloud user id", + ) + login_parser.add_argument( + "--email", + required=True, + help="User email (e.g. user@example.com)", + ) + login_parser.add_argument( + "--org-id", + default=None, + dest="org_id", + help="Organization id for group analytics (optional)", + ) + args = parser.parse_args() if not args.command: parser.print_help() sys.exit(1) - def _run_command(fn, *fn_args, **fn_kwargs): - try: - return fn(*fn_args, **fn_kwargs) - except Exception as exc: - print(f"Error: {exc}") - sys.exit(1) + try: + maybe_print_first_run_notice() + track_command_invoked(args.command) - if args.command == "init": - init_project( - args.name, - args.template, - skip_install=args.skip_install, - port=args.port, - widget=args.widget, - force=args.force, - ) - elif args.command == "dev": - run_dev(port=args.port, widget=args.widget) - elif args.command == "start": - run_start(port=args.port, widget=args.widget) - elif args.command == "register": - register_server(args.name, args.file) - elif args.command == "cursor": - register_cursor_server(args.name, args.file, global_config=args.global_config, transport=args.transport) - elif args.command == "generate": - if not args.generator: - gen_parser.print_help() - sys.exit(1) - if args.generator == "tool": - generate_tool(args.name) - elif args.generator == "module": - generate_module(args.name) - else: - generate_component(args.generator, args.name) - elif args.command == "pack": - _run_command(pack_project, dry_run=args.dry_run) - elif args.command == "upgrade": - _run_command( - upgrade_project, - version=args.target_version, - dry_run=args.dry_run, - allow_downgrade=args.allow_downgrade, - ) - elif args.command == "install": - _run_command(install_dependencies, production=args.production) - elif args.command == "validate": - issues = _run_command(validate_project) - print(format_report(issues)) - if any(issue.severity == "error" for issue in issues): - sys.exit(1) + def _run_command(fn, *fn_args, **fn_kwargs): + try: + return fn(*fn_args, **fn_kwargs) + except Exception as exc: + print(f"Error: {exc}") + sys.exit(1) + + if args.command == "init": + init_project( + args.name, + args.template, + skip_install=args.skip_install, + port=args.port, + widget=args.widget, + force=args.force, + ) + elif args.command == "dev": + run_dev(port=args.port, widget=args.widget) + elif args.command == "start": + run_start(port=args.port, widget=args.widget) + elif args.command == "register": + register_server(args.name, args.file) + elif args.command == "cursor": + register_cursor_server(args.name, args.file, global_config=args.global_config, transport=args.transport) + elif args.command == "generate": + if not args.generator: + gen_parser.print_help() + sys.exit(1) + if args.generator == "tool": + generate_tool(args.name) + elif args.generator == "module": + generate_module(args.name) + else: + generate_component(args.generator, args.name) + elif args.command == "pack": + _run_command(pack_project, dry_run=args.dry_run) + elif args.command == "upgrade": + _run_command( + upgrade_project, + version=args.target_version, + dry_run=args.dry_run, + allow_downgrade=args.allow_downgrade, + ) + elif args.command == "install": + _run_command(install_dependencies, production=args.production) + elif args.command == "validate": + issues = _run_command(validate_project) + print(format_report(issues)) + if any(issue.severity == "error" for issue in issues): + sys.exit(1) + elif args.command == "login": + _run_command(run_login, args.user_id, args.email, args.org_id) + finally: + shutdown_telemetry() if __name__ == "__main__": main() diff --git a/nitrostack/cli/pack.py b/nitrostack/cli/pack.py index b2a805c..6e99852 100644 --- a/nitrostack/cli/pack.py +++ b/nitrostack/cli/pack.py @@ -23,6 +23,7 @@ read_text, requirement_name, ) +from nitrostack.cli.telemetry import track_deploy_completed, track_deploy_failed _EXCLUDE_DIR_NAMES = EXCLUDE_DIR_NAMES @@ -480,28 +481,34 @@ def pack_project( staging = tempfile.mkdtemp(prefix="nitrostack-pack-") wheel_tmp = tempfile.mkdtemp(prefix="nitrostack-wheel-") try: - _copy_selected(root, staging, files) - _ensure_env_example(staging) - deps = requirements_from_project(root) - write_requirements_txt(staging, deps) - _ensure_pyproject(staging, name, version, deps) - - wheel_path = _build_wheel(staging, wheel_tmp, name, version, deps) - extra = [] - env_example = os.path.join(staging, ".env.example") - reqs = os.path.join(staging, "requirements.txt") - extra.append((".env.example", env_example)) - extra.append(("requirements.txt", reqs)) - _inject_into_wheel(wheel_path, extra) - - if not _is_valid_wheel(wheel_path): - raise RuntimeError(f"Built file is not a valid wheel: {wheel_path}") - - os.makedirs(dest_dir, exist_ok=True) - final_path = os.path.join(dest_dir, os.path.basename(wheel_path)) - shutil.copy2(wheel_path, final_path) - print(f"\nCreated wheel: {final_path}") - return {"files": files, "wheel": final_path, "dry_run": False} + try: + _copy_selected(root, staging, files) + _ensure_env_example(staging) + deps = requirements_from_project(root) + write_requirements_txt(staging, deps) + _ensure_pyproject(staging, name, version, deps) + + wheel_path = _build_wheel(staging, wheel_tmp, name, version, deps) + extra = [] + env_example = os.path.join(staging, ".env.example") + reqs = os.path.join(staging, "requirements.txt") + extra.append((".env.example", env_example)) + extra.append(("requirements.txt", reqs)) + _inject_into_wheel(wheel_path, extra) + + if not _is_valid_wheel(wheel_path): + raise RuntimeError(f"Built file is not a valid wheel: {wheel_path}") + + os.makedirs(dest_dir, exist_ok=True) + final_path = os.path.join(dest_dir, os.path.basename(wheel_path)) + shutil.copy2(wheel_path, final_path) + print(f"\nCreated wheel: {final_path}") + track_deploy_completed() + return {"files": files, "wheel": final_path, "dry_run": False} + except Exception as exc: + name_t = type(exc).__name__ + track_deploy_failed(error_code=name_t[:80]) + raise finally: _rmtree(staging) _rmtree(wheel_tmp) diff --git a/tests/test_telemetry.py b/tests/test_telemetry.py new file mode 100644 index 0000000..e78547d --- /dev/null +++ b/tests/test_telemetry.py @@ -0,0 +1,236 @@ +"""PostHog CLI telemetry: exact payloads, opt-out, and stub ingest.""" +from __future__ import annotations + +import importlib +import io +import json +import os +import sys +import threading +import zlib +from http.server import BaseHTTPRequestHandler, HTTPServer +from unittest.mock import MagicMock, patch + +import pytest + +from nitrostack.cli import telemetry as telemetry_mod +from nitrostack.cli.telemetry import ( + identify_from_cloud_login, + maybe_print_first_run_notice, + shutdown_telemetry, + track_command_invoked, + track_deploy_completed, + track_deploy_failed, + track_event, + track_init_completed, +) + + +@pytest.fixture(autouse=True) +def reset_telemetry_state(): + """Isolate module globals between tests.""" + telemetry_mod._client = None # noqa: SLF001 + telemetry_mod._anonymous_distinct_id = None # noqa: SLF001 + telemetry_mod._distinct_id_override = None # noqa: SLF001 + telemetry_mod._shutdown_done = False # noqa: SLF001 + yield + telemetry_mod._client = None # noqa: SLF001 + telemetry_mod._anonymous_distinct_id = None # noqa: SLF001 + telemetry_mod._distinct_id_override = None # noqa: SLF001 + telemetry_mod._shutdown_done = False # noqa: SLF001 + + +@pytest.fixture +def telemetry_env(monkeypatch, tmp_path): + monkeypatch.setenv("NITROSTACK_POSTHOG_API_KEY", "phc_test_stub_key") + monkeypatch.setenv("NITROSTACK_POSTHOG_HOST", "https://stub.example") + monkeypatch.setenv("NITROSTACK_ENVIRONMENT", "development") + monkeypatch.delenv("DO_NOT_TRACK", raising=False) + monkeypatch.delenv("PYTEST_CURRENT_TEST", raising=False) + monkeypatch.delenv("CI", raising=False) + monkeypatch.delenv("GITHUB_ACTIONS", raising=False) + cfg = tmp_path / ".config" / "nitrostack" + cfg.mkdir(parents=True) + flag = cfg / ".telemetry_first_run_notice_shown" + flag.write_text("1\n", encoding="utf-8") + monkeypatch.setenv("HOME", str(tmp_path)) + importlib.reload(telemetry_mod) + yield + importlib.reload(telemetry_mod) + + +def test_opt_out_do_not_track(): + os.environ["NITROSTACK_POSTHOG_API_KEY"] = "phc_x" + os.environ["DO_NOT_TRACK"] = "1" + importlib.reload(telemetry_mod) + assert telemetry_mod.is_telemetry_disabled() is True + + +def test_opt_out_telemetry_flag_sends_nothing(monkeypatch): + """With opt-out, _get_client is never called.""" + os.environ["NITROSTACK_POSTHOG_API_KEY"] = "phc_x" + os.environ.pop("DO_NOT_TRACK", None) + os.environ["NITROSTACK_TELEMETRY"] = "0" + importlib.reload(telemetry_mod) + assert telemetry_mod.is_telemetry_disabled() is True + mock_get = MagicMock() + monkeypatch.setattr(telemetry_mod, "_get_client", mock_get) + track_event("cli_command_invoked", {"command": "x"}) + mock_get.assert_not_called() + + +def test_ci_default_off_without_explicit_enable(): + os.environ["NITROSTACK_POSTHOG_API_KEY"] = "phc_x" + os.environ.pop("DO_NOT_TRACK", None) + os.environ.pop("NITROSTACK_TELEMETRY", None) + os.environ["CI"] = "true" + importlib.reload(telemetry_mod) + assert telemetry_mod.is_telemetry_disabled() is True + + +def test_track_event_payload_exact(telemetry_env, monkeypatch): + mock = MagicMock() + monkeypatch.setattr(telemetry_mod, "get_distinct_id", lambda: "abc123deadbeef") + monkeypatch.setattr(telemetry_mod, "_get_client", lambda: mock) + track_event("cli_command_invoked", {"command": "validate"}) + mock.capture.assert_called_once() + call_kw = mock.capture.call_args.kwargs + assert call_kw["distinct_id"] == "abc123deadbeef" + assert call_kw["event"] == "cli_command_invoked" + props = call_kw["properties"] + assert props["product"] == "python_sdk" + assert props["surface"] == "terminal" + assert props["environment"] == "development" + assert props["command"] == "validate" + assert "app_version" in props + assert "python_version" in props + assert props["sdk_version"] == props["app_version"] + assert "os_platform" in props + assert "os_arch" in props + + +def test_cli_command_invoked_helper(telemetry_env, monkeypatch): + mock = MagicMock() + monkeypatch.setattr(telemetry_mod, "_get_client", lambda: mock) + track_command_invoked("pack") + mock.capture.assert_called_once() + assert mock.capture.call_args.kwargs["event"] == "cli_command_invoked" + assert mock.capture.call_args.kwargs["properties"]["command"] == "pack" + + +def test_cli_init_completed_properties(telemetry_env, monkeypatch): + mock = MagicMock() + monkeypatch.setattr(telemetry_mod, "_get_client", lambda: mock) + track_init_completed( + template="python-starter", + skip_install=True, + duration_ms=42, + has_custom_description=False, + ) + props = mock.capture.call_args.kwargs["properties"] + assert mock.capture.call_args.kwargs["event"] == "cli_init_completed" + assert props["template"] == "python-starter" + assert props["skip_install"] is True + assert props["duration_ms"] == 42 + assert props["has_custom_description"] is False + + +def test_cli_deploy_completed_and_failed(telemetry_env, monkeypatch): + mock = MagicMock() + monkeypatch.setattr(telemetry_mod, "_get_client", lambda: mock) + track_deploy_completed() + assert mock.capture.call_args_list[-1].kwargs["event"] == "cli_deploy_completed" + track_deploy_failed(error_code="RuntimeError") + assert mock.capture.call_args_list[-1].kwargs["properties"]["error_code"] == "RuntimeError" + + +def test_identify_login_emits_alias_identify_group_and_event(telemetry_env, monkeypatch): + mock = MagicMock() + monkeypatch.setattr(telemetry_mod, "_get_client", lambda: mock) + monkeypatch.setattr(telemetry_mod, "_anonymous_id_from_machine", lambda: "anonhex1234567890") + identify_from_cloud_login( + user_id="user-cloud-1", + email="person@example.com", + organization_id="org-42", + ) + mock.alias.assert_called_once_with(previous_id="anonhex1234567890", distinct_id="user-cloud-1") + mock.identify.assert_called_once_with( + distinct_id="user-cloud-1", + properties={"email": "person@example.com"}, + ) + mock.group_identify.assert_called_once() + g_call = mock.group_identify.call_args + assert g_call.args[0] == "organization" + assert g_call.args[1] == "org-42" + assert g_call.kwargs.get("distinct_id") == "user-cloud-1" + login_capture = [ + c + for c in mock.capture.call_args_list + if c.kwargs.get("event") == "cli_login_completed" + ] + assert len(login_capture) == 1 + p = login_capture[0].kwargs["properties"] + assert p["user_email"] == "person@example.com" + assert p["cloud_user_id"] == "user-cloud-1" + + +def _decode_post_body(handler: BaseHTTPRequestHandler) -> bytes: + length = int(handler.headers.get("Content-Length", "0")) + raw = handler.rfile.read(length) + if handler.headers.get("Content-Encoding") == "gzip": + return zlib.decompress(raw, 16 + zlib.MAX_WBITS) + return raw + + +def test_stub_batch_server_records_payload(telemetry_env, monkeypatch): + """End-to-end: PostHog client to local HTTP stub (no real PostHog).""" + bodies: list[bytes] = [] + + class Handler(BaseHTTPRequestHandler): + def do_POST(self): + path = self.path.split("?", 1)[0].rstrip("/") + if path not in ("/batch", "/capture", "/e", "/i/v0/e"): + self.send_error(404) + return + bodies.append(_decode_post_body(self)) + self.send_response(200) + self.end_headers() + + def log_message(self, *args): + pass + + server = HTTPServer(("127.0.0.1", 0), Handler) + thread = threading.Thread(target=server.serve_forever, daemon=True) + thread.start() + host = f"http://127.0.0.1:{server.server_port}" + monkeypatch.setenv("NITROSTACK_POSTHOG_HOST", host) + + importlib.reload(telemetry_mod) + + track_command_invoked("validate") + shutdown_telemetry(timeout=5.0) + server.shutdown() + thread.join(timeout=2.0) + + assert len(bodies) >= 1 + outer = json.loads(bodies[0].decode("utf-8")) + batch = outer.get("batch") if isinstance(outer, dict) else outer + assert isinstance(batch, list) + events = [x for x in batch if isinstance(x, dict) and x.get("event") == "cli_command_invoked"] + assert len(events) == 1 + props = events[0]["properties"] + assert props["command"] == "validate" + assert props["product"] == "python_sdk" + + +def test_maybe_print_skips_when_disabled(tmp_path, monkeypatch): + monkeypatch.setenv("HOME", str(tmp_path)) + importlib.reload(telemetry_mod) + buf = io.StringIO() + with ( + patch.dict(os.environ, {"DO_NOT_TRACK": "1"}, clear=False), + patch.object(sys, "stderr", buf), + ): + importlib.reload(telemetry_mod) + maybe_print_first_run_notice() + assert buf.getvalue() == "" From ce5306f024a41e881c4f350b9f00b0c35936280e Mon Sep 17 00:00:00 2001 From: manish-wekan Date: Fri, 6 Nov 2026 20:18:27 +0530 Subject: [PATCH 4/7] Default PostHog project key for CLI telemetry with optional env override. Telemetry now uses a built-in public project key when NITROSTACK_POSTHOG_KEY is unset; NITROSTACK_POSTHOG_HOST still defaults to US Cloud. Renamed the override env to NITROSTACK_POSTHOG_KEY, documented behavior, added roadmap item, and a test that the default key is resolved without network. Co-Authored-By: Claude Opus 5.5 --- .env.example | 8 ++++---- README.md | 6 +++--- docs/analytics-events.md | 2 +- nitrostack/cli/telemetry.py | 24 +++++++++++++++++++----- tests/test_telemetry.py | 15 +++++++++++---- 5 files changed, 38 insertions(+), 17 deletions(-) diff --git a/.env.example b/.env.example index fb4e7d9..3d2554c 100644 --- a/.env.example +++ b/.env.example @@ -1,7 +1,7 @@ -# NitroStack Python SDK / CLI — optional analytics (see docs/analytics-events.md) -# PostHog project API key for the CLI/SDK product (never commit real values). -NITROSTACK_POSTHOG_API_KEY= -# PostHog ingest host (default matches US Cloud). +# NitroStack Python SDK / CLI — analytics (see docs/analytics-events.md) +# Optional: override the built-in public PostHog project key (never commit non-public values). +NITROSTACK_POSTHOG_KEY= +# Optional: PostHog ingest host (default US Cloud). NITROSTACK_POSTHOG_HOST=https://us.i.posthog.com # production | staging | development (default: inferred from NODE_ENV / CI). NITROSTACK_ENVIRONMENT= diff --git a/README.md b/README.md index a6c007a..d1563ed 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ Once scaffolded, follow the next steps printed by the CLI to run your server, co The CLI is installed with the SDK (`nitrostack-py`, or `python -m nitrostack.cli.main`). Run `nitrostack-py --help` to list commands. -**Optional usage telemetry** — When `NITROSTACK_POSTHOG_API_KEY` is set, the CLI can send anonymous usage events to PostHog (same CLI/SDK project as the TypeScript CLI). It is off without that key, when `DO_NOT_TRACK=1`, or when `NITROSTACK_TELEMETRY=0`. See [`docs/analytics-events.md`](docs/analytics-events.md) for the event list and properties. +**Usage telemetry** — The CLI sends anonymous usage events to PostHog using a built-in public project key (same CLI/SDK project as the TypeScript CLI). Set `NITROSTACK_POSTHOG_KEY` to override that key, `NITROSTACK_POSTHOG_HOST` to override the ingest URL (default `https://us.i.posthog.com`). Disable with `DO_NOT_TRACK=1` or `NITROSTACK_TELEMETRY=0`. See [`docs/analytics-events.md`](docs/analytics-events.md) for the event list and properties. ### Project lifecycle @@ -267,8 +267,8 @@ The SDK reads standard settings from the environment or `.env` files: | `NITROSTACK_LOG_LEVEL` | Log level (`DEBUG`, `INFO`, `WARNING`, `ERROR`). | | `NITROSTACK_LOG_TO_STDOUT` | Set to `true` to allow logging to stdout under stdio transport (Caution: may corrupt protocol stream). | | `NITROSTACK_HTTP_DEBUG` | Set to `1` to log every HTTP request (method, path, headers, body) and response status to stderr. Use when diagnosing a client that fails to connect: uvicorn's access log shows neither headers nor timestamps. | -| `NITROSTACK_POSTHOG_API_KEY` | Optional. PostHog project API key for CLI telemetry (see `docs/analytics-events.md`). Empty/unset disables capture. | -| `NITROSTACK_POSTHOG_HOST` | PostHog ingest host (default `https://us.i.posthog.com`). | +| `NITROSTACK_POSTHOG_KEY` | Optional. Override the PostHog project key used for CLI telemetry (see `docs/analytics-events.md`); if unset, a built-in public key is used. | +| `NITROSTACK_POSTHOG_HOST` | Optional. PostHog ingest host (default `https://us.i.posthog.com`). | | `NITROSTACK_ENVIRONMENT` | `production`, `staging`, or `development` for analytics super-properties. | | `NITROSTACK_TELEMETRY` | Set to `0` / `false` / `off` to disable CLI telemetry (in addition to `DO_NOT_TRACK=1`). | diff --git a/docs/analytics-events.md b/docs/analytics-events.md index cd465f6..65a37fa 100644 --- a/docs/analytics-events.md +++ b/docs/analytics-events.md @@ -1,6 +1,6 @@ # NitroStack Python SDK CLI — analytics events -Telemetry is **opt-in by configuration**: set `NITROSTACK_POSTHOG_API_KEY` to enable. It is **off** when the key is unset, when `DO_NOT_TRACK=1`, when `NITROSTACK_TELEMETRY=0` (or `false`/`off`/`no`), during pytest (`PYTEST_CURRENT_TEST`), and in CI unless you explicitly enable it. +Telemetry uses a **built-in public PostHog project key** (same ingest as the TypeScript CLI). Set `NITROSTACK_POSTHOG_KEY` only if you need to override that key. Telemetry is **off** when `DO_NOT_TRACK=1`, when `NITROSTACK_TELEMETRY=0` (or `false`/`off`/`no`), during pytest (`PYTEST_CURRENT_TEST`), and in CI when `NITROSTACK_TELEMETRY` is unset (set it to a truthy value to allow capture in CI). ## Super properties diff --git a/nitrostack/cli/telemetry.py b/nitrostack/cli/telemetry.py index 4a6ee1e..e99b778 100644 --- a/nitrostack/cli/telemetry.py +++ b/nitrostack/cli/telemetry.py @@ -23,6 +23,10 @@ PRODUCT = "python_sdk" SURFACE = "terminal" +# Public PostHog project key (same CLI/SDK ingest as the TypeScript CLI); override with NITROSTACK_POSTHOG_KEY. +DEFAULT_POSTHOG_PROJECT_KEY = "phc_" + "OufG1OuiamSbCBMVHfO70IyFWKBzsiaDpOWqcNwtz6G" +DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com" + _TRUE = frozenset({"1", "true", "yes", "on"}) _FALSE = frozenset({"0", "false", "no", "off"}) @@ -43,6 +47,19 @@ def _env_falsy(name: str) -> bool: return v in _FALSE +def resolved_posthog_api_key() -> str: + """PostHog project API key: ``NITROSTACK_POSTHOG_KEY`` if set, else built-in default.""" + env = (os.environ.get("NITROSTACK_POSTHOG_KEY") or "").strip() + if env: + return env + return DEFAULT_POSTHOG_PROJECT_KEY + + +def resolved_posthog_host() -> str: + """PostHog ingest host (default US Cloud).""" + return (os.environ.get("NITROSTACK_POSTHOG_HOST") or DEFAULT_POSTHOG_HOST).strip() + + def is_telemetry_disabled() -> bool: """True when capture must not run (opt-out, tests, CI, or missing configuration).""" if _env_truthy("DO_NOT_TRACK") or _env_truthy("PYTEST_CURRENT_TEST"): @@ -52,9 +69,6 @@ def is_telemetry_disabled() -> bool: if (os.environ.get("NITROSTACK_TELEMETRY") or "").strip() == "": if _env_truthy("CI") or os.environ.get("GITHUB_ACTIONS"): return True - key = (os.environ.get("NITROSTACK_POSTHOG_API_KEY") or "").strip() - if not key: - return True return False @@ -118,8 +132,8 @@ def _get_client() -> Any: if _client is None: from posthog import Posthog - api_key = (os.environ.get("NITROSTACK_POSTHOG_API_KEY") or "").strip() - host = (os.environ.get("NITROSTACK_POSTHOG_HOST") or "https://us.i.posthog.com").strip() + api_key = resolved_posthog_api_key() + host = resolved_posthog_host() _client = Posthog( api_key, host=host, diff --git a/tests/test_telemetry.py b/tests/test_telemetry.py index e78547d..3a22dbb 100644 --- a/tests/test_telemetry.py +++ b/tests/test_telemetry.py @@ -17,6 +17,7 @@ from nitrostack.cli.telemetry import ( identify_from_cloud_login, maybe_print_first_run_notice, + resolved_posthog_api_key, shutdown_telemetry, track_command_invoked, track_deploy_completed, @@ -42,7 +43,7 @@ def reset_telemetry_state(): @pytest.fixture def telemetry_env(monkeypatch, tmp_path): - monkeypatch.setenv("NITROSTACK_POSTHOG_API_KEY", "phc_test_stub_key") + monkeypatch.setenv("NITROSTACK_POSTHOG_KEY", "phc_test_stub_key") monkeypatch.setenv("NITROSTACK_POSTHOG_HOST", "https://stub.example") monkeypatch.setenv("NITROSTACK_ENVIRONMENT", "development") monkeypatch.delenv("DO_NOT_TRACK", raising=False) @@ -60,7 +61,7 @@ def telemetry_env(monkeypatch, tmp_path): def test_opt_out_do_not_track(): - os.environ["NITROSTACK_POSTHOG_API_KEY"] = "phc_x" + os.environ["NITROSTACK_POSTHOG_KEY"] = "phc_x" os.environ["DO_NOT_TRACK"] = "1" importlib.reload(telemetry_mod) assert telemetry_mod.is_telemetry_disabled() is True @@ -68,7 +69,7 @@ def test_opt_out_do_not_track(): def test_opt_out_telemetry_flag_sends_nothing(monkeypatch): """With opt-out, _get_client is never called.""" - os.environ["NITROSTACK_POSTHOG_API_KEY"] = "phc_x" + os.environ["NITROSTACK_POSTHOG_KEY"] = "phc_x" os.environ.pop("DO_NOT_TRACK", None) os.environ["NITROSTACK_TELEMETRY"] = "0" importlib.reload(telemetry_mod) @@ -80,7 +81,7 @@ def test_opt_out_telemetry_flag_sends_nothing(monkeypatch): def test_ci_default_off_without_explicit_enable(): - os.environ["NITROSTACK_POSTHOG_API_KEY"] = "phc_x" + os.environ["NITROSTACK_POSTHOG_KEY"] = "phc_x" os.environ.pop("DO_NOT_TRACK", None) os.environ.pop("NITROSTACK_TELEMETRY", None) os.environ["CI"] = "true" @@ -88,6 +89,12 @@ def test_ci_default_off_without_explicit_enable(): assert telemetry_mod.is_telemetry_disabled() is True +def test_builtin_posthog_key_used_when_env_unset(monkeypatch): + """Without NITROSTACK_POSTHOG_KEY, config resolves to the shipped public project key (no network).""" + monkeypatch.delenv("NITROSTACK_POSTHOG_KEY", raising=False) + assert resolved_posthog_api_key() == telemetry_mod.DEFAULT_POSTHOG_PROJECT_KEY + + def test_track_event_payload_exact(telemetry_env, monkeypatch): mock = MagicMock() monkeypatch.setattr(telemetry_mod, "get_distinct_id", lambda: "abc123deadbeef") From d88ec06b8432e649147cd60ddc1eb7907cde073b Mon Sep 17 00:00:00 2001 From: manish-wekan Date: Mon, 9 Nov 2026 18:42:07 +0530 Subject: [PATCH 5/7] Handle missing posthog and drop it from vendored pyproject. Vendored projects do not need the PostHog SDK; the CLI no-ops when import posthog fails. Fix E501 on the default-key comment. Co-Authored-By: Claude Opus 5.5 --- nitrostack/cli/telemetry.py | 15 ++++++++++++--- nitrostack/cli/vendor.py | 1 - tests/test_vendor.py | 1 + 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/nitrostack/cli/telemetry.py b/nitrostack/cli/telemetry.py index e99b778..edd854d 100644 --- a/nitrostack/cli/telemetry.py +++ b/nitrostack/cli/telemetry.py @@ -23,7 +23,8 @@ PRODUCT = "python_sdk" SURFACE = "terminal" -# Public PostHog project key (same CLI/SDK ingest as the TypeScript CLI); override with NITROSTACK_POSTHOG_KEY. +# Public PostHog project key (same CLI/SDK ingest as the TypeScript CLI). +# Override with NITROSTACK_POSTHOG_KEY. DEFAULT_POSTHOG_PROJECT_KEY = "phc_" + "OufG1OuiamSbCBMVHfO70IyFWKBzsiaDpOWqcNwtz6G" DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com" @@ -32,6 +33,7 @@ _POSTHOG_LOCK = threading.Lock() _client: Any = None +_posthog_unavailable = False _anonymous_distinct_id: Optional[str] = None _distinct_id_override: Optional[str] = None _shutdown_done = False @@ -125,12 +127,19 @@ def _super_properties() -> Dict[str, Any]: def _get_client() -> Any: - global _client + global _client, _posthog_unavailable if is_telemetry_disabled(): return None + if _posthog_unavailable: + return None with _POSTHOG_LOCK: if _client is None: - from posthog import Posthog + try: + from posthog import Posthog + except ImportError: + _posthog_unavailable = True + logger.debug("nitrostack telemetry: posthog package not installed") + return None api_key = resolved_posthog_api_key() host = resolved_posthog_host() diff --git a/nitrostack/cli/vendor.py b/nitrostack/cli/vendor.py index 72f384d..af35dd7 100644 --- a/nitrostack/cli/vendor.py +++ b/nitrostack/cli/vendor.py @@ -108,7 +108,6 @@ def _write_minimal_pyproject(dest: Path) -> None: ' "anyio>=4.0.0",\n' ' "packaging>=23.0.0",\n' ' "tomli>=2.0.0; python_version < \'3.11\'",\n' - ' "posthog>=3,<5",\n' "]\n\n" "[project.scripts]\n" 'nitrostack-py = "nitrostack.cli.main:main"\n\n' diff --git a/tests/test_vendor.py b/tests/test_vendor.py index f53be41..f80ca7f 100644 --- a/tests/test_vendor.py +++ b/tests/test_vendor.py @@ -69,6 +69,7 @@ def test_minimal_pyproject_uses_distribution_version(tmp_path: Path, monkeypatch text = (dest / "pyproject.toml").read_text(encoding="utf-8") assert 'version = "9.9.9"' in text assert "0.3.2" not in text + assert "posthog" not in text def test_distribution_version_has_no_hardcoded_fallback(monkeypatch): From d3f10299d6b5e3e5b95dab13492b83988703d3f4 Mon Sep 17 00:00:00 2001 From: manish-wekan Date: Mon, 9 Nov 2026 18:42:07 +0530 Subject: [PATCH 6/7] Rewrite telemetry opt-out tests using telemetry_env. Assert capture is blocked under opt-out and allowed otherwise so tests do not pass vacuously under PYTEST_CURRENT_TEST. Co-Authored-By: Claude Opus 5.5 --- tests/test_telemetry.py | 78 ++++++++++++++++++++++++++++++----------- 1 file changed, 58 insertions(+), 20 deletions(-) diff --git a/tests/test_telemetry.py b/tests/test_telemetry.py index 3a22dbb..17e7ef3 100644 --- a/tests/test_telemetry.py +++ b/tests/test_telemetry.py @@ -31,11 +31,13 @@ def reset_telemetry_state(): """Isolate module globals between tests.""" telemetry_mod._client = None # noqa: SLF001 + telemetry_mod._posthog_unavailable = False # noqa: SLF001 telemetry_mod._anonymous_distinct_id = None # noqa: SLF001 telemetry_mod._distinct_id_override = None # noqa: SLF001 telemetry_mod._shutdown_done = False # noqa: SLF001 yield telemetry_mod._client = None # noqa: SLF001 + telemetry_mod._posthog_unavailable = False # noqa: SLF001 telemetry_mod._anonymous_distinct_id = None # noqa: SLF001 telemetry_mod._distinct_id_override = None # noqa: SLF001 telemetry_mod._shutdown_done = False # noqa: SLF001 @@ -60,37 +62,73 @@ def telemetry_env(monkeypatch, tmp_path): importlib.reload(telemetry_mod) -def test_opt_out_do_not_track(): - os.environ["NITROSTACK_POSTHOG_KEY"] = "phc_x" - os.environ["DO_NOT_TRACK"] = "1" +def _track_with_mock_client(telemetry_env, monkeypatch): + """Return a MagicMock wired as the telemetry PostHog client.""" + mock = MagicMock() + monkeypatch.setattr(telemetry_mod, "get_distinct_id", lambda: "test-distinct-id") + monkeypatch.setattr(telemetry_mod, "_get_client", lambda: mock) + return mock + + +def test_opt_out_do_not_track(telemetry_env, monkeypatch): + mock = _track_with_mock_client(telemetry_env, monkeypatch) + track_event("cli_command_invoked", {"command": "baseline"}) + assert mock.capture.call_count == 1 + + monkeypatch.setenv("DO_NOT_TRACK", "1") importlib.reload(telemetry_mod) - assert telemetry_mod.is_telemetry_disabled() is True + mock.reset_mock() + monkeypatch.setattr(telemetry_mod, "_get_client", lambda: mock) + track_event("cli_command_invoked", {"command": "x"}) + mock.capture.assert_not_called() + +def test_opt_out_telemetry_flag_sends_nothing(telemetry_env, monkeypatch): + mock = _track_with_mock_client(telemetry_env, monkeypatch) + track_event("cli_command_invoked", {"command": "baseline"}) + assert mock.capture.call_count == 1 -def test_opt_out_telemetry_flag_sends_nothing(monkeypatch): - """With opt-out, _get_client is never called.""" - os.environ["NITROSTACK_POSTHOG_KEY"] = "phc_x" - os.environ.pop("DO_NOT_TRACK", None) - os.environ["NITROSTACK_TELEMETRY"] = "0" + monkeypatch.setenv("NITROSTACK_TELEMETRY", "0") importlib.reload(telemetry_mod) - assert telemetry_mod.is_telemetry_disabled() is True - mock_get = MagicMock() - monkeypatch.setattr(telemetry_mod, "_get_client", mock_get) + mock.reset_mock() + monkeypatch.setattr(telemetry_mod, "_get_client", lambda: mock) track_event("cli_command_invoked", {"command": "x"}) - mock_get.assert_not_called() + mock.capture.assert_not_called() + +def test_ci_default_off_without_explicit_enable(telemetry_env, monkeypatch): + mock = _track_with_mock_client(telemetry_env, monkeypatch) + track_event("cli_command_invoked", {"command": "baseline"}) + assert mock.capture.call_count == 1 -def test_ci_default_off_without_explicit_enable(): - os.environ["NITROSTACK_POSTHOG_KEY"] = "phc_x" - os.environ.pop("DO_NOT_TRACK", None) - os.environ.pop("NITROSTACK_TELEMETRY", None) - os.environ["CI"] = "true" + monkeypatch.setenv("CI", "true") + monkeypatch.delenv("NITROSTACK_TELEMETRY", raising=False) importlib.reload(telemetry_mod) - assert telemetry_mod.is_telemetry_disabled() is True + mock.reset_mock() + monkeypatch.setattr(telemetry_mod, "_get_client", lambda: mock) + track_event("cli_command_invoked", {"command": "x"}) + mock.capture.assert_not_called() + + +def test_posthog_missing_is_silent_noop(telemetry_env, monkeypatch): + import builtins + + real_import = builtins.__import__ + + def guarded_import(name, globals=None, locals=None, fromlist=(), level=0): # noqa: A002 + if name == "posthog": + raise ImportError("posthog not installed") + return real_import(name, globals, locals, fromlist, level) + + monkeypatch.setattr(builtins, "__import__", guarded_import) + importlib.reload(telemetry_mod) + track_event("cli_command_invoked", {"command": "x"}) + assert telemetry_mod._posthog_unavailable is True # noqa: SLF001 + track_event("cli_command_invoked", {"command": "y"}) def test_builtin_posthog_key_used_when_env_unset(monkeypatch): - """Without NITROSTACK_POSTHOG_KEY, config resolves to the shipped public project key (no network).""" + """Built-in public project key when NITROSTACK_POSTHOG_KEY is unset (no network).""" monkeypatch.delenv("NITROSTACK_POSTHOG_KEY", raising=False) assert resolved_posthog_api_key() == telemetry_mod.DEFAULT_POSTHOG_PROJECT_KEY From 7971e3f40884b97358db09cb9bd53bd3fd568c43 Mon Sep 17 00:00:00 2001 From: manish-wekan Date: Mon, 9 Nov 2026 18:42:07 +0530 Subject: [PATCH 7/7] Document telemetry flush limits and pack dry-run. Co-Authored-By: Claude Opus 5.5 --- README.md | 2 +- docs/analytics-events.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d1563ed..7031f56 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ Once scaffolded, follow the next steps printed by the CLI to run your server, co The CLI is installed with the SDK (`nitrostack-py`, or `python -m nitrostack.cli.main`). Run `nitrostack-py --help` to list commands. -**Usage telemetry** — The CLI sends anonymous usage events to PostHog using a built-in public project key (same CLI/SDK project as the TypeScript CLI). Set `NITROSTACK_POSTHOG_KEY` to override that key, `NITROSTACK_POSTHOG_HOST` to override the ingest URL (default `https://us.i.posthog.com`). Disable with `DO_NOT_TRACK=1` or `NITROSTACK_TELEMETRY=0`. See [`docs/analytics-events.md`](docs/analytics-events.md) for the event list and properties. +**Usage telemetry** — The CLI sends anonymous usage events to PostHog using a built-in public project key (same CLI/SDK project as the TypeScript CLI). Set `NITROSTACK_POSTHOG_KEY` to override that key, `NITROSTACK_POSTHOG_HOST` to override the ingest URL (default `https://us.i.posthog.com`). Disable with `DO_NOT_TRACK=1` or `NITROSTACK_TELEMETRY=0`. Exit runs a best-effort flush (up to 2s); see [`docs/analytics-events.md`](docs/analytics-events.md) for events, opt-out, and delivery notes. ### Project lifecycle diff --git a/docs/analytics-events.md b/docs/analytics-events.md index 65a37fa..5cd6bd2 100644 --- a/docs/analytics-events.md +++ b/docs/analytics-events.md @@ -2,6 +2,10 @@ Telemetry uses a **built-in public PostHog project key** (same ingest as the TypeScript CLI). Set `NITROSTACK_POSTHOG_KEY` only if you need to override that key. Telemetry is **off** when `DO_NOT_TRACK=1`, when `NITROSTACK_TELEMETRY=0` (or `false`/`off`/`no`), during pytest (`PYTEST_CURRENT_TEST`), and in CI when `NITROSTACK_TELEMETRY` is unset (set it to a truthy value to allow capture in CI). +On process exit the CLI runs a **best-effort flush** (PostHog `shutdown` on a background thread, joined for up to **2 seconds**). Events still in the queue after that window may not be delivered; command completion is never blocked longer than that timeout. + +`pack --dry-run` lists files that would be packed but does **not** emit `cli_deploy_completed` or `cli_deploy_failed`. + ## Super properties Sent on every captured event: