# Chalk Python SDK Reference: Chalk Functions
source: https://docs.chalk.ai/api-docs#section-chalk-functions

Use `chalk.functions` to define Chalk expressions for computing features in your model classes.

Typical usage looks something like:

```python
import chalk.functions as F
from chalk import _
from chalk.features import features
@features
class User:
    email: Primary[str]
    email_username: str = F.lower(F.split_part(_.email, 1))
```

Expressions are composed using functions from chalk.functions, which are designed to operate symbolically on feature references like `_.email`. These functions return expression trees rather than concrete values, and should only be used in class field assignments, not within regular Python logic or resolver bodies.

In addition to the functions listed below, Chalk supports the following infix operations for expressions:

- Arithmetic: `+`, `-`, `*`, `/`, `%`
- Comparison: `==`, `!=`, `<`, `<=`, `>`, `>=`
- Logical: `&` (and), `|` (or), `~` (not)

These operators can be used inline with feature references to build expressions:

```python
user_is_gmail: bool = _.email_username == "gmail"
```

Expressions are statically analyzable and translated into execution plans. They do not execute Python code directly. Instead, the expressions execute in vectorized C++.

Do not use functions from `chalk.functions` or expression operators inside a method or a resolver body—they are intended exclusively for defining feature computations in [`@features`](https://docs.chalk.ai/api-docs#features) classes.
