# 8.X Python API call for data stream creation

**URL:** <https://discuss.elastic.co/t/8-x-python-api-call-for-data-stream-creation/298230>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [February 24, 2022, 11:48pm UTC](https://discuss.elastic.co/t/8-x-python-api-call-for-data-stream-creation/298230 "2022-02-24T23:48:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RogerS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rogers/32/101199_2.png) [@RogerS](https://discuss.elastic.co/u/RogerS)\
**Post date:** [February 24, 2022, 11:48pm UTC](https://discuss.elastic.co/t/8-x-python-api-call-for-data-stream-creation/298230/1 "2022-02-24T23:48:45Z")

</div>

I am trying to move to data streams and have issues with 8. x

File "/scripts/bin/test/test.py", line 49  
` response = es.cluster.put_component_template(name="icd6_settings", template: icd6_template )`  
^  
SyntaxError: positional argument follows keyword argument

If someone has a working call for the settings, mappings, and creating a template I would greatly appreciate it.

It would really be great if the readthedocs site had working examples of each call?

---

<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:** [March 24, 2022, 11:48pm UTC](https://discuss.elastic.co/t/8-x-python-api-call-for-data-stream-creation/298230/2 "2022-03-24T23:48:51Z")

</div>

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