# How to write a hello world code

**URL:** <https://discuss.tryton.org/t/how-to-write-a-hello-world-code/488>\
**Category:** Developer\
**Created:** [January 23, 2018, 1:43pm UTC](https://discuss.tryton.org/t/how-to-write-a-hello-world-code/488 "2018-01-23T13:43:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sr\_mehta](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@sr\_mehta](https://discuss.tryton.org/u/sr_mehta)\
**Post date:** [January 23, 2018, 1:43pm UTC](https://discuss.tryton.org/t/how-to-write-a-hello-world-code/488/1 "2018-01-23T13:43:22Z")

</div>

somebody can help me…??? where to start learning tryton

---

<div class="post-metadata">

**Author:** ![sr\_mehta](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@sr\_mehta](https://discuss.tryton.org/u/sr_mehta)\
**Post date:** [January 23, 2018, 1:48pm UTC](https://discuss.tryton.org/t/how-to-write-a-hello-world-code/488/2 "2018-01-23T13:48:39Z")

</div>

Hello,i am a beginner in trytond and i am little bit confused how to code in tryton and run it..

---

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [January 23, 2018, 2:35pm UTC](https://discuss.tryton.org/t/how-to-write-a-hello-world-code/488/3 "2018-01-23T14:35:54Z")

</div>

There is no hello world module to tryton but you can write a model with a single field to start. In order to do this you should start by writing a module to add some functionalities on the application, have a look at:

[http://doc.tryton.org/4.6/trytond/doc/topics/modules/index.html#topics-modules](http://doc.tryton.org/4.6/trytond/doc/topics/modules/index.html#topics-modules)

Once you have the basic structure, you should create a python file which adds the model and the fields. Then you should create some views from the model as explained on:

[http://doc.tryton.org/4.6/trytond/doc/topics/views/index.html#topics-views](http://doc.tryton.org/4.6/trytond/doc/topics/views/index.html#topics-views)

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [January 23, 2018, 2:54pm UTC](https://discuss.tryton.org/t/how-to-write-a-hello-world-code/488/4 "2018-01-23T14:54:18Z")

</div>

There is also this [presentation](http://downloads.tryton.org/TUL2014/crash-course.pdf). It may be a little bit old but most of the concepts should still be valid.

---

<div class="post-metadata">

**Author:** ![sr\_mehta](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@sr\_mehta](https://discuss.tryton.org/u/sr_mehta)\
**Post date:** [January 24, 2018, 6:21am UTC](https://discuss.tryton.org/t/how-to-write-a-hello-world-code/488/5 "2018-01-24T06:21:17Z")

</div>

let me know how to run the module

---

<div class="post-metadata">

**Author:** ![sr\_mehta](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@sr\_mehta](https://discuss.tryton.org/u/sr_mehta)\
**Post date:** [January 24, 2018, 6:42am UTC](https://discuss.tryton.org/t/how-to-write-a-hello-world-code/488/6 "2018-01-24T06:42:01Z")

</div>

my model sturcture  
/hello  
—/hello  
------/hello.py  
------/ **init**.py  
------/tryton.cfg  
------/hello.xml

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [January 25, 2018, 12:40pm UTC](https://discuss.tryton.org/t/how-to-write-a-hello-world-code/488/7 "2018-01-25T12:40:45Z")

</div>

You do not run module directly, you have to have it under the `trytond/modules` directory or installed by an entrypoint `[trytond.modules]`. Then you have to activate the module for a database using the `trytond-admin` command and run the server as usual.

---

<div class="post-metadata">

**Author:** ![mono](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/mono/32/289_2.png) [@mono](https://discuss.tryton.org/u/mono)\
**Post date:** [November 10, 2018, 8:06am UTC](https://discuss.tryton.org/t/how-to-write-a-hello-world-code/488/8 "2018-11-10T08:06:47Z")

</div>

[https://tryton-documentation.readthedocs.io/en/latest/developer\_guide/example\_library\_1.html](https://tryton-documentation.readthedocs.io/en/latest/developer_guide/example_library_1.html)

[http://devops.neurotec.co/trytonerp/tryton-apps1/](http://devops.neurotec.co/trytonerp/tryton-apps1/)
