# Suricata and Python intergrate

**URL:** https://forum.suricata.io/t/suricata-and-python-intergrate/1268
**Category:** Help
**Created:** [April 5, 2021, 3:04pm UTC](https://forum.suricata.io/t/suricata-and-python-intergrate/1268 "2021-04-05T15:04:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![darrkj2049](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/darrkj2049/32/568_2.png) [@darrkj2049](https://forum.suricata.io/u/darrkj2049)
#### Post date: [April 5, 2021, 3:04pm UTC](https://forum.suricata.io/t/suricata-and-python-intergrate/1268/1 "2021-04-05T15:04:58Z")

</div>

is there any API or python lib for suricata? I’m building an application with pyqt/pyside which can manage suricata rules and log analyst.

---

<div class="post-metadata">

### Author: ![Jeff\_Lucovsky](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/jeff_lucovsky/32/11_2.png) [@Jeff\_Lucovsky](https://forum.suricata.io/u/Jeff_Lucovsky)
#### Post date: [April 6, 2021, 11:44am UTC](https://forum.suricata.io/t/suricata-and-python-intergrate/1268/2 "2021-04-06T11:44:36Z")

</div>

Have you examined `suricatasc` yet? It’s in our githup repo within the `python` subdirectory and can be used to manage some aspects of Suricata’s lifecycle – rule reload, etc.

[Suricatasc documentation](https://suricata.readthedocs.io/en/suricata-6.0.2/manpages/suricatasc.html#suricata-socket-control)

---

<div class="post-metadata">

### Author: ![darrkj2049](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/darrkj2049/32/568_2.png) [@darrkj2049](https://forum.suricata.io/u/darrkj2049)
#### Post date: [April 11, 2021, 2:08am UTC](https://forum.suricata.io/t/suricata-and-python-intergrate/1268/3 "2021-04-11T02:08:32Z")

</div>

thanks, but suricatasc didn’t have the function i want, are there any tools to help you configure suricata.yaml? I’m trying to make a application with GUI to let users to controls yaml without manually go to the yaml itself

---

<div class="post-metadata">

### Author: ![ish](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/ish/32/8_2.png) [@ish](https://forum.suricata.io/u/ish)
#### Post date: [April 11, 2021, 1:02pm UTC](https://forum.suricata.io/t/suricata-and-python-intergrate/1268/4 "2021-04-11T13:02:02Z")

</div>

What sort of functions are you after? Suricata itself doesn’t provide any functionality to help with the editing of `suricata.yaml`, that is something you’ll have to take care of yourself. It is YAML, so you can use the Python yaml module to parse it.

Suricata can then be used to test the configuration you output with the `-T` command line module, this is what `Suricata-Update` does to test new rules, but it also tests the `suricata.yaml` as well. `Suricata-Update` is written in Python as well, and integrates with Suricata just using the `subprocess` module.
