{"id":27775,"library":"g4x-helpers","title":"G4X Helpers","description":"Python helpers for G4X applications. Provides utility functions and classes for logging, configuration, monitoring, and common infrastructure patterns. Current version 3.0.2, supports Python 3.10-3.12. Active development, monthly releases.","status":"active","version":"3.0.2","language":"python","source_language":"en","source_url":"https://github.com/g4x/g4x-helpers","tags":["helpers","logging","configuration","monitoring","utilities"],"install":[{"cmd":"pip install g4x-helpers","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP client for API calls","package":"requests","optional":true},{"reason":"Data validation and settings management","package":"pydantic","optional":true}],"imports":[{"note":"v3.0+ moved classes into submodules","wrong":"from g4x_helpers import G4XLogger","symbol":"G4XLogger","correct":"from g4x_helpers.logging import G4XLogger"},{"note":"v3.0+ moved classes into submodules","wrong":"from g4x_helpers import ConfigLoader","symbol":"ConfigLoader","correct":"from g4x_helpers.config import ConfigLoader"},{"note":"v3.0+ moved classes into submodules","wrong":"from g4x_helpers import MetricsCollector","symbol":"MetricsCollector","correct":"from g4x_helpers.monitoring import MetricsCollector"}],"quickstart":{"code":"from g4x_helpers.logging import G4XLogger\nfrom g4x_helpers.config import ConfigLoader\nimport os\n\nlogger = G4XLogger(name='myapp')\nconfig = ConfigLoader(prefix='MYAPP', env_file='.env')\n\n# Access configuration\napi_key = config.get('API_KEY', default=os.environ.get('API_KEY', ''))\nlogger.info(f\"Starting app with API key present: {bool(api_key)}\")","lang":"python","description":"Basic usage: initialize logger and config loader."},"warnings":[{"fix":"Change imports to from g4x_helpers.logging import ..., from g4x_helpers.config import ..., etc.","message":"v3.0.0 restructured package: all classes moved from top-level __init__ into submodules (logging, config, monitoring, etc.). Direct imports from g4x_helpers will fail.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Use prefix='MYAPP' instead of env_prefix='MYAPP'.","message":"v3.0.0 deprecated ConfigLoader(env_prefix=) in favor of prefix= parameter.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Always pass name='your_app_name' to G4XLogger.","message":"G4XLogger requires argument name (positional) in v3.0+. Omitting name raises TypeError: G4XLogger() missing 1 required positional argument.","severity":"gotcha","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run 'pip install g4x-helpers' in the correct virtual environment.","cause":"Package not installed or incorrect Python environment.","error":"ModuleNotFoundError: No module named 'g4x_helpers'"},{"fix":"Use 'from g4x_helpers.logging import G4XLogger' instead.","cause":"Version 3.0+ moved classes into submodules.","error":"AttributeError: module 'g4x_helpers' has no attribute 'G4XLogger'"},{"fix":"Call G4XLogger(name='myapp') with a string argument.","cause":"Instantiated G4XLogger without required 'name' argument (v3.0+).","error":"TypeError: G4XLogger.__init__() missing 1 required positional argument: 'name'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}