Integrate Tryton on my own personal flask project

Right now im following a tutorial on flask and have successfully created a app. As time went on i found that creating an inventory system from scratch will be so time consuming and thats when i decided to maybe integrate part of tryton server to my app. Im looking for just the ui creation part of tryton to help me.

Hopefully my explanation is clear

I dont get what is your question, but you should look for flask-tryton. You’ll connect your app to tryton using a simple decorator.

1 Like

With flask tryton you just need to import the models from the pool and then use the CRUD methods to save them on the database.


Do i need to install trytond to use that? Also how do you create the db tables?

Do you have something something that helps build the gui part like a flask wtforms.

Yes, you need to install trytond. Flask-trytond only connects ‘flask app’ to trytond models (database)

Yes, because when using flask tryton you use the trytond database as backed for your flask application. Furthermore you can call the logic methods of tryton.

The tables are created like a normal tryton database. See the setup database section of our docs.

You can use flask-wtforms if you are used to it. Flask tryton is compatible with other flask plugins.

There is a sample app on the flask-tryton readme if you are looking for some sample code to start.


I apologize i think you misunderstand my previous statement. I dont want to use flask wtforms. What i want to do is if trytond also can easily create web gui like flask wtform or flask admin or is trytond only for database and logic?

No that am aware of it. Normally the tryton client (web or desktop) is used to have the same functinality as flask admin and then you create a web gui that suits your needs.

How do i connect to a postgresql database ?
Is it through ?

app.config[TRYTON_DATABASE] = insert uri here

Can anyone share how to connect to postgresql

Also do i need to run flask and trytond at the same time?

flask-tryton uses only a Tryton configuration file set by TRYTON_CONFIG see