An early look at Encore for Python, entering beta soon.

We are bringing Python support to Encore.
As Encore becomes the default way for engineering teams to build safely with agents in their own cloud, more organizations want to bring that model to stacks built in languages beyond Go and TypeScript.
Today, we're happy to share an early look at the first of those additions, Encore.py, which will enter beta soon.
Encore.py brings Encore's type-safe infrastructure primitives to Python, alongside frameworks teams already use. In the example below, a FastAPI service declares the database it needs directly in the application:
from encore import sqldb
from fastapi import FastAPI
db = sqldb.SQLDatabase("greetings", migrations="./migrations")
app = FastAPI()
@app.get("/")
async def greeting() -> dict:
row = await db.query_row(
"SELECT message FROM greetings ORDER BY id DESC LIMIT 1"
)
return {"message": row["message"]}
If you're new to Encore, declarations like this become part of an application model that Encore uses to derive the infrastructure needed to run the application. Developers and agents work with resources in code, while platform teams control how those resources run in each environment, giving agents clear guardrails without making the underlying AWS or GCP configuration part of their task.
In the example above, static analysis tells Encore which service uses greetings, allowing it to connect the service to the database and grant only the IAM permissions required. The region, size, scaling, and other environment-specific settings remain under the platform team's control through the Encore dashboard or existing Terraform.

The greetings declaration represents the database the application needs, while the platform configuration determines how it is provided in each environment. It can be backed by PostgreSQL locally, an isolated database in a preview environment, and RDS, Cloud SQL, or existing infrastructure in production, without changing the Python code that uses it.
With access to both the application model and a running preview environment, an agent can stay with a feature through implementation and verification, testing changes end to end against the complete application and infrastructure configured to closely match production.

Let your coding agents build and verify against real infrastructure, inside a sandbox.

Alexandre joins as Head of Developer Relations to help bring automated infrastructure to more developers and teams.

Keep the agent session behind every Encore change, directly in Git.