# Best approach to load a model?

**URL:** <https://community.stardog.com/t/best-approach-to-load-a-model/3291>\
**Category:** Support\
**Created:** [October 1, 2021, 8:30am UTC](https://community.stardog.com/t/best-approach-to-load-a-model/3291 "2021-10-01T08:30:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cgueret](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/cgueret/32/1152_2.png) [@cgueret](https://community.stardog.com/u/cgueret)\
**Post date:** [October 1, 2021, 8:30am UTC](https://community.stardog.com/t/best-approach-to-load-a-model/3291/1 "2021-10-01T08:30:56Z")

</div>

Hi!

I am trying to setup a mixed git/Studio development where we can work in Studio and copy&paste content in Git, with some scripts to link the two. That works fine with virtual graphs, using pystardog, but I cannot get that approach to work for the model...

I currently do this

```auto
model_file = pathlib.Path(base_path, pathlib.Path('model.ttl'))
  with stardog.Connection(self.config['stardog']['database'], **self.config['stardog']['connection']) as conn:
    conn.begin()
    conn.add(content.File(str(model_file)), graph_uri='http://example.org#model')
    conn.commit()

```

and that works, the model gets in Stardog. But then Studio doesn't recognize it as a model and we can't edit it there :-/ We still can see it read-only from the default graph but it's only half of what we aim at.

Is there a better way to push the model (and retrieve it later) so that Studio (and Explorer) will see it as a model?

Christophe

---

<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 15, 2021, 8:31am UTC](https://community.stardog.com/t/best-approach-to-load-a-model/3291/2 "2021-10-15T08:31:05Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
