Hi @kirken ,
To confirm Dan's suspicion, Attribute Rules will only work with Arcade expressions. You cannot create an attribute rule using Python as the expression. The link shared by @DanPatterson before uses Python to configure the Attribute Rule, but inside it is still using the Arcade expression defined as a string inside the Python script.
In short, if you want to use Attribute Rules you will always need Arcade...