> For the complete documentation index, see [llms.txt](https://docs.r.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.r.xyz/glider-ide/api/contract/contract.source_code.md).

# Contract.source\_code()

Returns the source code of the contract.

`source_code() → str`

## Example query

```python
from glider import *

def query():
  contracts = Contracts().exec(1)

  print(contracts[0].source_code())

  return contracts
```

## Example output

<figure><img src="https://2237101709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDX4Ojc4j1ef51TUAtYOx%2Fuploads%2FGryTlp4wPkx0QnlwjgfH%2Fimage.png?alt=media&amp;token=336efa2f-e9fd-40bf-98d6-e144183607dd" alt=""><figcaption></figcaption></figure>
