> For the complete documentation index, see [llms.txt](https://smallso.gitbook.io/tencent-cloud-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://smallso.gitbook.io/tencent-cloud-sdk/python-docs/serverless-functions/class-and-method/function-code/get-code-context.md).

# get\_code\_context 方法

## 简要

获取包含无服务器云函数源代码配置描述结构上下文的字典实例。

```python
def get_code_context(self) -> dict
```

## 参数

该方法没有参数。

## 返回值

该方法返回包含无服务器云函数源代码描述结构上下文的字典实例。如果当前尚未配置源代码来源，该方法将始终返回 `None`。

## 异常

该方法不会主动引发任何异常。

## 示例

下面我们将通过一段 Python 代码向您演示如何使用该方法：

```python
functions.FunctionCode().get_code_context()
```

## 适用于

#### Tencent Cloud SDK for Python

产品软件包：tencent-cloud-sdk-serverless-functions >= 0.1.1
