https://flyte.org logo
#ask-the-community
Title
# ask-the-community
l

Leiqing

03/23/2023, 8:36 AM
Hi team, I’m using
flytekit
to list projects, but it only gives me active projects, whereas with
flytectl
, I’m getting all projects by default and can filter for active projects with
--filter.fieldSelector "state=1"
Copy code
from flytekit.clients.friendly import SynchronousFlyteClient
from flytekit.configuration import Config
from flytekit.models.filters import Filter

client = SynchronousFlyteClient(Config.auto().platform)
print(client.list_projects_paginated())
How can I get all projects with
flytekit
?
I also tried to use filters, but maybe I’m not using it correctly.
Copy code
client.list_projects_paginated(filters=[Filter(key="fieldSelector", value="eq(state,1)")])
gives me
Copy code
unrecognized filter function: nil(fieldSelector,eq
s

Samhita Alla

03/23/2023, 10:49 AM
Can you try
client.list_projects_paginated(filters=[Filter.from_python_std("eq(state,1)")])
?