# How to get the path of a guild resource

**URL:** https://guildai.org/t/how-to-get-the-path-of-a-guild-resource/705
**Category:** General
**Created:** [May 5, 2021, 6:30pm UTC](https://guildai.org/t/how-to-get-the-path-of-a-guild-resource/705 "2021-05-05T18:30:58Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![samedii](https://yyz1.discourse-cdn.com/flex031/user_avatar/guildai.org/samedii/32/125_2.png) [@samedii](https://guildai.org/u/samedii)
#### Post date: [May 5, 2021, 6:30pm UTC](https://guildai.org/t/how-to-get-the-path-of-a-guild-resource/705/1 "2021-05-05T18:30:58Z")

</div>

Is there a better way of doing this? I tried to use `guild.ipy` but didn’t have any luck

```
import subprocess

subprocess.check_output(f"guild open {selection} -c echo", shell=True).decode("utf-8").strip()

```

---

<div class="post-metadata">

### Author: ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/guildai.org/garrett/32/224_2.png) [@garrett](https://guildai.org/u/garrett)
#### Post date: [May 7, 2021, 7:44pm UTC](https://guildai.org/t/how-to-get-the-path-of-a-guild-resource/705/2 "2021-05-07T19:44:16Z")

</div>

A slightly cleaner command would be:

```command
guild select {selection} --path

```

But no, nothing in `ipy` for this, other than programmatically finding the run and getting it’s `dir`. Something like this:

```python
from guild import ipy

runs = ipy.runs()
runs.iloc[0].run.value.dir

```

It’d be nice if `runs` supported various filters but it’s designed for programmatic selection via the dataframe interface.

A yet-to-be-officially-released API module `guild._api` can be used this way:

```python
from guild import _api as gapi

gapi.runs_list()[0].dir

```

This `runs_list` function supports all of the filters so you can do something like this:

```python
gapi.runs_list(ops=["train"], completed=True)[0].dir

```

While this module is marked as private, it’s quite stable and used extensively to automate tests, which are run all the time.

---

<div class="post-metadata">

### Author: ![samedii](https://yyz1.discourse-cdn.com/flex031/user_avatar/guildai.org/samedii/32/125_2.png) [@samedii](https://guildai.org/u/samedii)
#### Post date: [May 7, 2021, 11:23pm UTC](https://guildai.org/t/how-to-get-the-path-of-a-guild-resource/705/3 "2021-05-07T23:23:53Z")

</div>

This looks great. Being able to access guild via a python interface has been on my wish list for a while 😃
