Skip to main content
Question

Where is pygen.graphql_query() method?

  • April 3, 2025
  • 1 reply
  • 4 views

Hello,

 

As per the docuementaiton Pygen exposes a `graphql_query` method. However, I’m not able to find it. Could you please help?

 

version used:  cognite-pygen==1.2.1

Thanks

1 reply

Anders  Albert
Seasoned Practitioner
Forum|alt.badge.img
  • Seasoned Practitioner
  • 111 replies
  • April 4, 2025

That method is on a generated SDK. 

For example:

from cognite.pygen import generate_sdk_notebook

pygen = generate_sdk_notebook(
    ("sp_pygen_power", "WindTurbine", "1"),
    client,
)

my_query = """...""""
result = pygen.graphql_query(my_query)

 


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings