{"id":9909,"library":"lumigo-core","title":"Lumigo Core Utilities","description":"Lumigo-core is an internal utility library providing core functionalities for other Lumigo Python packages, primarily the Lumigo Python tracers. It contains common utilities for environment detection, configuration, and reporting, designed to operate within the context of AWS serverless environments. It is not typically intended for direct end-user application development but is an essential dependency for Lumigo's observability tools. The current version is 0.0.16, and releases are tied to the needs of the Lumigo tracer libraries.","status":"active","version":"0.0.16","language":"en","source_language":"en","source_url":"https://github.com/lumigo-io/python-core","tags":["utility","internal","observability","aws","serverless","tracer"],"install":[{"cmd":"pip install lumigo-core","lang":"bash","label":"Install lumigo-core"}],"dependencies":[{"reason":"HTTP client for various internal communications.","package":"requests","optional":false},{"reason":"Decorator utilities for wrapping functions and classes.","package":"wrapt","optional":false},{"reason":"JSON serialization/deserialization for dataclasses.","package":"dataclasses_json","optional":false},{"reason":"SSL/TLS functionality, potentially for secure communication.","package":"pyOpenSSL","optional":false},{"reason":"Character set detection and normalization.","package":"charset_normalizer","optional":false}],"imports":[{"note":"A common utility function to check if code runs in an AWS environment.","symbol":"is_aws_environment","correct":"from lumigo_core.utils import is_aws_environment"},{"note":"Utility to retrieve the current AWS region.","symbol":"get_region","correct":"from lumigo_core.utils import get_region"},{"note":"Access to Lumigo-specific configuration settings.","symbol":"Configuration","correct":"from lumigo_core.configuration import Configuration"}],"quickstart":{"code":"from lumigo_core.utils import is_aws_environment, get_region\nimport os\n\n# lumigo-core is primarily an internal utility. \n# Direct 'quickstarts' are uncommon. \n# This demonstrates accessing a basic utility function.\n\nprint(f\"Is running in AWS environment? {is_aws_environment()}\")\nprint(f\"Detected AWS region: {get_region()}\")\n\n# Example of how configuration might be accessed (internal use usually):\nfrom lumigo_core.configuration import Configuration\nConfiguration.lumigo_debug_mode = True\nprint(f\"Lumigo Debug Mode: {Configuration.lumigo_debug_mode}\")","lang":"python","description":"Demonstrates accessing a simple utility function. While you can import and use these utilities, `lumigo-core` is generally an internal dependency for the Lumigo tracer, not a standalone library for direct end-user application setup. Many functionalities rely on the tracer's initialization."},"warnings":[{"fix":"For tracing functionality, install and configure `lumigo-tracer` rather than directly using `lumigo-core` utilities. Only use `lumigo-core` directly if you understand its specific internal purpose.","message":"Lumigo-core is primarily an internal dependency. Most direct usage is not officially supported or documented for end-users. It's designed to be consumed by other Lumigo libraries (e.g., `lumigo-tracer`), which handle its initialization and context.","severity":"gotcha","affected_versions":"All versions"},{"fix":"When upgrading, ensure that `lumigo-core` is updated as a dependency of `lumigo-tracer` (e.g., `pip install --upgrade lumigo-tracer`) rather than manually attempting to upgrade `lumigo-core` in isolation, unless explicitly advised.","message":"Version compatibility between `lumigo-core` and `lumigo-tracer` (or other Lumigo libraries) is critical. Mismatched versions can lead to unexpected behavior or runtime errors.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Verify the exact module path from the source code or official documentation of `lumigo-core`. If you're looking for tracing features, ensure `lumigo-tracer` is installed and you're importing from it.","cause":"Attempting to import a submodule or symbol that does not exist in `lumigo-core` or is located in another Lumigo library (e.g., `lumigo-tracer`).","error":"ModuleNotFoundError: No module named 'lumigo_core.x'"},{"fix":"Consult the `lumigo_core/configuration.py` source code to see available settings. For general Lumigo configuration, refer to the `lumigo-tracer` documentation, as many settings are managed there.","cause":"Trying to access a configuration setting that doesn't exist or isn't intended for direct modification, or a setting that's only initialized by the Lumigo tracer.","error":"AttributeError: 'Configuration' object has no attribute 'some_setting'"}]}