From a297c6aceefa3a88cc8e093f8ee3e7bb2606f9cd Mon Sep 17 00:00:00 2001 From: Roy Jones Date: Mon, 15 Dec 2025 21:00:58 +0100 Subject: [PATCH 1/2] docs: add env.sample for kalshi starter Added env.sample file with an example set of environment variables for the starter code. --- env.sample | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 env.sample diff --git a/env.sample b/env.sample new file mode 100644 index 0000000..bfe0669 --- /dev/null +++ b/env.sample @@ -0,0 +1,8 @@ +# Example environment variables for kalshi-starter-code-python + +# API credentials for Kalshi +KALSHI_API_KEY=your_api_key_here +KALSHI_API_SECRET=your_api_secret_here + +# Environment: "demo" or "prod" +KALSHI_ENV=demo From b58dbbb6b588e620f36b7934ab1bfec1c7b946ca Mon Sep 17 00:00:00 2001 From: Roy Jones Date: Wed, 17 Dec 2025 13:47:39 +0100 Subject: [PATCH 2/2] test: add env flag sanity test Added a small test that simply checks that the KALSHI_ENV variable is read without errors. --- tests/test_env_flag_sanity.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/test_env_flag_sanity.py diff --git a/tests/test_env_flag_sanity.py b/tests/test_env_flag_sanity.py new file mode 100644 index 0000000..007f44c --- /dev/null +++ b/tests/test_env_flag_sanity.py @@ -0,0 +1,12 @@ +import os + + +def test_kalshi_env_flag_present() -> None: + """ + Sanity test to verify that KALSHI_ENV has a reasonable value + when running tests in a configured environment. + """ + value = os.getenv("KALSHI_ENV", "") + # The variable may be empty in some local setups, so this test is + # intentionally lenient and only checks that we can read it. + assert value is not None