> 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/functions/functions.constructors.md).

# Functions.constructors()

`constructors() →` [`Functions`](/glider-ide/api/functions.md)

Adds a filter to get only the constructors.

## Example

```python
from glider import *

def query():
  # Fetch a list of constructors
  functions = Functions().constructors().exec(2)

  return functions
```

## Output

<figure><img src="https://2237101709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDX4Ojc4j1ef51TUAtYOx%2Fuploads%2FiXH9vtiQy813Rqe6x3vn%2Fimage.png?alt=media&amp;token=a4325cdd-dd43-41f2-ae02-f595382f59e2" alt=""><figcaption></figcaption></figure>

## Old constructor syntax

The function also accounts for the old constructor syntax, which in the older Solidity versions was named the same as the contract.&#x20;

```python
from glider import *

def query():
  funcs = Functions().constructors().without_name('constructor').exec(2)
  return funcs
```

Output

<figure><img src="https://2237101709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDX4Ojc4j1ef51TUAtYOx%2Fuploads%2Fd6FSJcsv2ihX36pOWhrP%2Fimage.png?alt=media&amp;token=eedd94fb-843a-458c-95a6-f865c7d615dd" alt=""><figcaption></figcaption></figure>
