# Python module for Line-us

**URL:** <https://forum.line-us.com/t/python-module-for-line-us/496>\
**Category:** Programming and API\
**Created:** [November 28, 2019, 3:01pm UTC](https://forum.line-us.com/t/python-module-for-line-us/496 "2019-11-28T15:01:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rob](https://forum.line-us.com/user_avatar/forum.line-us.com/rob/32/8_2.png) [@rob](https://forum.line-us.com/u/rob)\
**Post date:** [November 28, 2019, 3:01pm UTC](https://forum.line-us.com/t/python-module-for-line-us/496/1 "2019-11-28T15:01:11Z")

</div>

Hi Everyone.

I’ve been working on a Python module for Line-us and am just interested to hear from any Python programmers (or anyone else as it’s not really Python specific) on preferences for the API. It seems that at one end of the spectrum we can have functions that abstract away the details of GCode, so for example:

`def move_to(x, y)`  
`def line_to(x, y)`  
`def set_draw_speed(speed)`

at the other end of the spectrum you would construct the GCode and the module would just send it, so:

`def send_gcode(gcode)`

somewhere in the middle is:

`def g01(x, y, z)`  
`def g94(15)`

I’m tending towards implementing the last option for most/all GCodes but also supporting the `send_gcode()` option.

Let me know what you think…

---

<div class="post-metadata">

**Author:** ![rob](https://forum.line-us.com/user_avatar/forum.line-us.com/rob/32/8_2.png) [@rob](https://forum.line-us.com/u/rob)\
**Post date:** [December 10, 2019, 7:29pm UTC](https://forum.line-us.com/t/python-module-for-line-us/496/2 "2019-12-10T19:29:11Z")

</div>

I’ve now released the Python module - went with the ‘somewhere in the middle’ option! Documentation is [available here](https://lineuspythonmodule.readthedocs.io/en/latest/) and I’d be interested to hear how people get on.
