{"id":27653,"library":"cloudshell-core","title":"CloudShell Core","description":"Core package for CloudShell Python orchestration and automation. Provides common utilities including logging, basic interfaces, and other infrastructure for CloudShell packages. Current version 2.2.180, updated frequently.","status":"active","version":"2.2.180","language":"python","source_language":"en","source_url":"https://github.com/QualiSystems/cloudshell-core","tags":["cloudshell","orchestration","automation","logging","utilities"],"install":[{"cmd":"pip install cloudshell-core","lang":"bash","label":"Default install"}],"dependencies":[],"imports":[{"note":"hyphen vs underscore; package uses cloudshell.core not cloudshell_core","wrong":"from cloudshell_core.context import CloudShellCoreContext","symbol":"CloudShellCoreContext","correct":"from cloudshell.core.context import CloudShellCoreContext"},{"note":"missing .core subpackage","wrong":"from cloudshell.context import CancellationContext","symbol":"CancellationContext","correct":"from cloudshell.core.context import CancellationContext"},{"note":"missing .core subpackage","wrong":"from cloudshell.logger import LoggerSession","symbol":"LoggerSession","correct":"from cloudshell.core.logger import LoggerSession"},{"note":"direct submodule not re-exported","wrong":"from cloudshell.api import QualiApiClient","symbol":"QualiApiClient","correct":"from cloudshell.api.quali_api import QualiApiClient"}],"quickstart":{"code":"from cloudshell.core.logger import LoggerSession\nfrom cloudshell.core.context import CloudShellCoreContext\nimport os\n\ncs_context = CloudShellCoreContext(\n    server_host=os.environ.get('CLOUDSHELL_SERVER_HOST', 'localhost'),\n    api_port=9000,\n    api_token=os.environ.get('CLOUDSHELL_API_TOKEN', '')\n)\nlogger = LoggerSession('my_logger', cs_context)\nprint('Context and logger created successfully')","lang":"python","description":"Initialize CloudShell context and a logger session."},"warnings":[{"fix":"Update all imports to use cloudshell.core subpackage pattern (e.g., from cloudshell.core.logger import ...). Consult changelog for full migration.","message":"Version 2.0.0 introduced many breaking changes, including restructuring of imports. Code from v1.x (e.g., from cloudshell.core.xyz) may not work directly.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use 'import cloudshell' or 'from cloudshell.core import ...'.","message":"Package name on PyPI is 'cloudshell-core' with a hyphen, but Python imports use 'cloudshell' (no hyphen, no underscore). Many new users mistakenly try 'import cloudshell_core'.","severity":"gotcha","affected_versions":"all"},{"fix":"Always inject CloudShellCoreContext when creating ApiClient instances.","message":"Using 'cloudshell.api.QualiApiClient' without proper context may lead to authentication issues in newer versions.","severity":"deprecated","affected_versions":">=2.2.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use 'import cloudshell' or 'from cloudshell.core import ...'.","cause":"Trying to import the package name with underscore instead of the correct import path.","error":"ModuleNotFoundError: No module named 'cloudshell_core'"},{"fix":"Use 'from cloudshell.core.context import CloudShellCoreContext'.","cause":"Top-level cloudshell package does not re-export all submodules; need full dotted path.","error":"ImportError: cannot import name 'CloudShellCoreContext' from 'cloudshell'"},{"fix":"Ensure CloudShellCoreContext is properly configured with server_host, api_port, and api_token.","cause":"QualiApiClient initialized without a valid context or token.","error":"AttributeError: 'NoneType' object has no attribute 'send_request'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}