Set the value of the barcode field type

Hello;

How to set the value of the barcode field type from javascript and python?

Regards
Bilal