Skip to content

Refactor API Key Handling and Fix Python Version Check#18

Open
abhijitgawai wants to merge 3 commits into
WazirX:masterfrom
abhijitgawai:feature/improvements_abhijit
Open

Refactor API Key Handling and Fix Python Version Check#18
abhijitgawai wants to merge 3 commits into
WazirX:masterfrom
abhijitgawai:feature/improvements_abhijit

Conversation

@abhijitgawai
Copy link
Copy Markdown

Description: This PR introduces improvements to security configuration and fixes a Python version compatibility issue.

  1. Improved Security Logic (Environment Variables)

Refactored Client and WebsocketClient to check for API_KEY and SECRET_KEY environment variables by default.
This allows users to store credentials securely (e.g., in a .env file or system environment) properly, rather than hardcoding them in scripts.
Updated README.md to document this configuration method.
Updated test scripts (rest/test.py, websocket/test.py) to utilize these environment variables.
2. Python Version Compatibility Fix

Fixed an init.py error where Python versions newer than 3.7 (e.g., 3.10, 3.12) were incorrectly triggering a "Python>=3.7 required" exception due to flawed logic.
Replaced the manual version check with sys.version_info for robust comparison.

This was referenced Jan 21, 2026
@abhijitgawai
Copy link
Copy Markdown
Author

@dibyajitgoswamidg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant