# How to access Slicers Python API via an external program while slicer is running?

**URL:** <https://discourse.slicer.org/t/how-to-access-slicers-python-api-via-an-external-program-while-slicer-is-running/16351>\
**Category:** Development\
**Tags:** python, api\
**Created:** [March 4, 2021, 8:31am UTC](https://discourse.slicer.org/t/how-to-access-slicers-python-api-via-an-external-program-while-slicer-is-running/16351 "2021-03-04T08:31:14Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![fuadamaschin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fuadamaschin/32/10055_2.png) [@fuadamaschin](https://discourse.slicer.org/u/fuadamaschin)\
**Post date:** [March 4, 2021, 8:31am UTC](https://discourse.slicer.org/t/how-to-access-slicers-python-api-via-an-external-program-while-slicer-is-running/16351/1 "2021-03-04T08:31:14Z")

</div>

As far as I’ve understood this there are 2 main ways to access Slicers Python API:

- Using the built-in python console
- Starting slicer with the `--python-script` or `--python-code` flag

But I want to have an external program running on the same machine as slicer. This program should then be able to control the running slicer instance via Slicers Python API.

Is this possible?

I would be grateful if you could point me to some ressources.

---

_[View the full topic](https://discourse.slicer.org/t/how-to-access-slicers-python-api-via-an-external-program-while-slicer-is-running/16351)._
