> For the complete documentation index, see [llms.txt](https://algodea-docs.bloxbean.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://algodea-docs.bloxbean.com/create-or-configure-a-stateful-contract-with-pyteal-programs.md).

# Create or Configure a Stateful Contract with PyTeal Programs

You can create a new stateful contract configuration and set a PyTeal program as approval or clear state program for the stateful application.

To create a new stateful contract configuration,

* Right click on the project > New > Stateful TEAL Configuration

![](/files/-MNg7ZbDGih6i6dGGeJa)

* Provide contract name, approval program and clear state program

![](/files/-MNgJGQgi5AeKIzbLvJC)

* Select PyTeal program for both approval and clearstate program

![](/files/-MNgJR9U7Hhz61mLuIaY)

* Notice that when you select a .py file for approval / clear state program, the value will be converted to \*.teal file in the generated-src folder. That's because the pyteal file is compiled into TEAL file during pyteal compilation.

![](/files/-MNgJgd4J5nlpYkL4tPC)
