# PyStardog Query Executor

**URL:** <https://community.stardog.com/t/pystardog-query-executor/4811>\
**Category:** Support\
**Created:** [January 17, 2024, 6:38am UTC](https://community.stardog.com/t/pystardog-query-executor/4811 "2024-01-17T06:38:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dipanjann](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@dipanjann](https://community.stardog.com/u/dipanjann)\
**Post date:** [January 17, 2024, 6:38am UTC](https://community.stardog.com/t/pystardog-query-executor/4811/1 "2024-01-17T06:38:26Z")

</div>

Hi,

I have been trying to use the pystardog module to query the database using the pystardog API like

query\_result = conn.select(  
query= query,  
# offset=100,  
limit=1000,  
reasoning=True  
)

However the functionality of querying the whole database when virtual transparency is on is available on studio with setting "stardog:context:all" while querying .  
I want to replicate the same functionality with the pystardog api , but was not able to reproduce the same results.

Can you help me how to approach this to produce similar results?

---

<div class="post-metadata">

**Author:** ![Lars\_Heling](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/lars_heling/32/1657_2.png) [@Lars\_Heling](https://community.stardog.com/u/Lars_Heling)\
**Post date:** [January 17, 2024, 6:47am UTC](https://community.stardog.com/t/pystardog-query-executor/4811/2 "2024-01-17T06:47:05Z")

</div>

Hi Dipanjan,

you should be able to set the default graph URI to `tag:stardog:api:context:all` using the `default_graph_uri` parameter to get the desired behavior.

```python
query_result = conn.select(
query= query,
limit=1000,
reasoning=True,
default_graph_uri=["tag:stardog:api:context:all"]
)

```

Make sure to have at least pystardog v 0.17.0 .

Best regards  
Lars

---

<div class="post-metadata">

**Author:** ![dipanjann](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@dipanjann](https://community.stardog.com/u/dipanjann)\
**Post date:** [January 17, 2024, 12:53pm UTC](https://community.stardog.com/t/pystardog-query-executor/4811/3 "2024-01-17T12:53:55Z")

</div>

Thanks ,

Working perfectly now.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [March 12, 2024, 9:06pm UTC](https://community.stardog.com/t/pystardog-query-executor/4811/4 "2024-03-12T21:06:24Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [May 12, 2024, 3:52am UTC](https://community.stardog.com/t/pystardog-query-executor/4811/5 "2024-05-12T03:52:46Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [October 26, 2024, 1:41am UTC](https://community.stardog.com/t/pystardog-query-executor/4811/6 "2024-10-26T01:41:13Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [May 17, 2025, 12:47am UTC](https://community.stardog.com/t/pystardog-query-executor/4811/7 "2025-05-17T00:47:33Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [January 4, 2026, 5:07am UTC](https://community.stardog.com/t/pystardog-query-executor/4811/8 "2026-01-04T05:07:56Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [September 7, 2026, 11:57am UTC](https://community.stardog.com/t/pystardog-query-executor/4811/9 "2026-09-07T11:57:10Z")

</div>


