How to work with smart contract stateful

Hello everybody.
This is my first approach with algorand platform in which I have to work with smart contracts.
I have some problem to connect my client with smart contract. I use PyTEAL to generate a TEAL file to declare my contract.

So, my questions:

  1. how to compile teal file in algorand node? (I use Purestake to connect with algorand node and algosdk, I don’t use CLI tools)
  2. how to connect client with smart contract?

I apologize if I’ve been confused, but I’ve so many doubts

you can use the API to compile and deploy the stateful contract. Take a look here: Algorand Developer Docs Also make sure to watch this video for overview of TEAL and smart contracts: Algorand Partner Training | Overview of Stateful and Stateless Smart Contracts - YouTube