[ { "label": "annotations", "importPath": "__future__", "description": "__future__", "isExtraImport": true, "detail": "__future__", "documentation": {} }, { "label": "os", "kind": 6, "isExtraImport": true, "importPath": "os", "description": "os", "detail": "os", "documentation": {} }, { "label": "site", "kind": 6, "isExtraImport": true, "importPath": "site", "description": "site", "detail": "site", "documentation": {} }, { "label": "sys", "kind": 6, "isExtraImport": true, "importPath": "sys", "description": "sys", "detail": "sys", "documentation": {} }, { "label": "logging", "kind": 6, "isExtraImport": true, "importPath": "logging", "description": "logging", "detail": "logging", "documentation": {} }, { "label": "uuid", "kind": 6, "isExtraImport": true, "importPath": "uuid", "description": "uuid", "detail": "uuid", "documentation": {} }, { "label": "load_dotenv", "importPath": "dotenv", "description": "dotenv", "isExtraImport": true, "detail": "dotenv", "documentation": {} }, { "label": "Union", "importPath": "typing", "description": "typing", "isExtraImport": true, "detail": "typing", "documentation": {} }, { "label": "FastAPI", "importPath": "fastapi", "description": "fastapi", "isExtraImport": true, "detail": "fastapi", "documentation": {} }, { "label": "logger", "importPath": "app.constants", "description": "app.constants", "isExtraImport": true, "detail": "app.constants", "documentation": {} }, { "label": "bin_dir", "kind": 5, "importPath": ".venv.bin.activate_this", "description": ".venv.bin.activate_this", "peekOfCode": "bin_dir = os.path.dirname(abs_file)\nbase = bin_dir[: -len(\"bin\") - 1] # strip away the bin part from the __file__, plus the path separator\n# prepend bin to PATH (this file is inside the bin directory)\nos.environ[\"PATH\"] = os.pathsep.join([bin_dir, *os.environ.get(\"PATH\", \"\").split(os.pathsep)])\nos.environ[\"VIRTUAL_ENV\"] = base # virtual env is right above bin directory\nos.environ[\"VIRTUAL_ENV_PROMPT\"] = \"gitea-integration-py3.10\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"../lib/python3.10/site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))", "detail": ".venv.bin.activate_this", "documentation": {} }, { "label": "base", "kind": 5, "importPath": ".venv.bin.activate_this", "description": ".venv.bin.activate_this", "peekOfCode": "base = bin_dir[: -len(\"bin\") - 1] # strip away the bin part from the __file__, plus the path separator\n# prepend bin to PATH (this file is inside the bin directory)\nos.environ[\"PATH\"] = os.pathsep.join([bin_dir, *os.environ.get(\"PATH\", \"\").split(os.pathsep)])\nos.environ[\"VIRTUAL_ENV\"] = base # virtual env is right above bin directory\nos.environ[\"VIRTUAL_ENV_PROMPT\"] = \"gitea-integration-py3.10\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"../lib/python3.10/site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)", "detail": ".venv.bin.activate_this", "documentation": {} }, { "label": "os.environ[\"PATH\"]", "kind": 5, "importPath": ".venv.bin.activate_this", "description": ".venv.bin.activate_this", "peekOfCode": "os.environ[\"PATH\"] = os.pathsep.join([bin_dir, *os.environ.get(\"PATH\", \"\").split(os.pathsep)])\nos.environ[\"VIRTUAL_ENV\"] = base # virtual env is right above bin directory\nos.environ[\"VIRTUAL_ENV_PROMPT\"] = \"gitea-integration-py3.10\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"../lib/python3.10/site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)\nsys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix", "detail": ".venv.bin.activate_this", "documentation": {} }, { "label": "os.environ[\"VIRTUAL_ENV\"]", "kind": 5, "importPath": ".venv.bin.activate_this", "description": ".venv.bin.activate_this", "peekOfCode": "os.environ[\"VIRTUAL_ENV\"] = base # virtual env is right above bin directory\nos.environ[\"VIRTUAL_ENV_PROMPT\"] = \"gitea-integration-py3.10\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"../lib/python3.10/site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)\nsys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix\nsys.prefix = base", "detail": ".venv.bin.activate_this", "documentation": {} }, { "label": "os.environ[\"VIRTUAL_ENV_PROMPT\"]", "kind": 5, "importPath": ".venv.bin.activate_this", "description": ".venv.bin.activate_this", "peekOfCode": "os.environ[\"VIRTUAL_ENV_PROMPT\"] = \"gitea-integration-py3.10\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"../lib/python3.10/site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)\nsys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix\nsys.prefix = base", "detail": ".venv.bin.activate_this", "documentation": {} }, { "label": "prev_length", "kind": 5, "importPath": ".venv.bin.activate_this", "description": ".venv.bin.activate_this", "peekOfCode": "prev_length = len(sys.path)\nfor lib in \"../lib/python3.10/site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)\nsys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix\nsys.prefix = base", "detail": ".venv.bin.activate_this", "documentation": {} }, { "label": "sys.path[:]", "kind": 5, "importPath": ".venv.bin.activate_this", "description": ".venv.bin.activate_this", "peekOfCode": "sys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix\nsys.prefix = base", "detail": ".venv.bin.activate_this", "documentation": {} }, { "label": "sys.real_prefix", "kind": 5, "importPath": ".venv.bin.activate_this", "description": ".venv.bin.activate_this", "peekOfCode": "sys.real_prefix = sys.prefix\nsys.prefix = base", "detail": ".venv.bin.activate_this", "documentation": {} }, { "label": "sys.prefix", "kind": 5, "importPath": ".venv.bin.activate_this", "description": ".venv.bin.activate_this", "peekOfCode": "sys.prefix = base", "detail": ".venv.bin.activate_this", "documentation": {} }, { "label": "logger", "kind": 5, "importPath": "app.constants", "description": "app.constants", "peekOfCode": "logger = logging.getLogger(__name__)", "detail": "app.constants", "documentation": {} }, { "label": "read_root", "kind": 2, "importPath": "app.main", "description": "app.main", "peekOfCode": "def read_root():\n return {\"Hello\": \"World\"}\n@app.post(\"/integration\")\ndef intgr(body):\n logger.info(body)\n return {\"status\": \"success\"}", "detail": "app.main", "documentation": {} }, { "label": "intgr", "kind": 2, "importPath": "app.main", "description": "app.main", "peekOfCode": "def intgr(body):\n logger.info(body)\n return {\"status\": \"success\"}", "detail": "app.main", "documentation": {} }, { "label": "app", "kind": 5, "importPath": "app.main", "description": "app.main", "peekOfCode": "app = FastAPI()\n@app.get(\"/\")\ndef read_root():\n return {\"Hello\": \"World\"}\n@app.post(\"/integration\")\ndef intgr(body):\n logger.info(body)\n return {\"status\": \"success\"}", "detail": "app.main", "documentation": {} } ]