# Using python to import to logstash

**URL:** https://discuss.elastic.co/t/using-python-to-import-to-logstash/173623
**Category:** Logstash
**Created:** [March 24, 2019, 2:30am UTC](https://discuss.elastic.co/t/using-python-to-import-to-logstash/173623 "2019-03-24T02:30:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mathurin68](https://avatars.discourse-cdn.com/v4/letter/m/6bbea6/32.png) [@mathurin68](https://discuss.elastic.co/u/mathurin68)
#### Post date: [March 24, 2019, 2:30am UTC](https://discuss.elastic.co/t/using-python-to-import-to-logstash/173623/1 "2019-03-24T02:30:31Z")

</div>

Using python to grab data from various sources, in json form, BUT need to normalize field names, and add tags. locations, etc. So I need to get it to logstash(I guess).

Is the easiest way to get it to logstash using python sockets?

```auto
input {
  tcp {
      port => 5044
      codec => json
  } 
}

```

Or is there an even easier way? I've got the python ES client but dont see a way to use that to get the data into logstash.

Thanks

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 21, 2019, 2:30am UTC](https://discuss.elastic.co/t/using-python-to-import-to-logstash/173623/2 "2019-04-21T02:30:41Z")

</div>

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