Difference between revisions of "Development Tools"

From Official Kodi Wiki
Jump to: navigation, search
(KodiSwift: Updated from xbmcswift to kodiswift, added the tutorial page.)
(Improve layout, add VS Code info, added debugging section)
Line 1: Line 1:
 
{{mininav|[[Development]]|[[Add-on development]]}}
 
{{mininav|[[Development]]|[[Add-on development]]}}
  
<br />
 
 
Below you will find software that can be useful in Add-on Development.
 
Below you will find software that can be useful in Add-on Development.
  
 +
== Python IDE's ==
  
== Text Editors ==
+
=== Visual Studio Code ===
 +
'''Platforms'''
 +
* Linux
 +
* Windows
 +
* macOS
  
Sublime 3
 
  
'''Description''' = Sublime Text is a sophisticated text editor for code, markup and prose.
+
[[File:vsc.png]]
You'll love the slick user interface, extraordinary features and amazing performance.
 
  
'''URL''' = http://www.sublimetext.com/3
+
'''Description'''
  
 +
Code editing. Redefined.Free. Built on open source. Runs everywhere.
 +
If you're not a pro or you are not used to work with another IDE, use this.
  
[[File:sublimetext.png]]
+
'''Note'''
  
 +
Install the 'Python' extension by Microsoft.
  
 +
''A Visual Studio Code extension with rich support for the Python language (for all actively supported versions of the language: 2.7, >=3.5), including features such as IntelliSense, linting, debugging, code navigation, code formatting, Jupyter notebook support, refactoring, variable explorer, test explorer, snippets, and more!''
  
 +
'''Homepage'''
  
NotePad++
+
https://code.visualstudio.com/
  
'''Description''' = A very popular text editor for Windows Operating System. Very quick to launch and has a number of plugins available. Some nice text formating.
+
=== PyCharm ===
  
'''URL''' = http://notepad-plus-plus.org/
+
'''Platforms'''
 
+
* Linux
 
+
* Windows
 
+
* macOS
[[File:Notepadplusplus.png]]
 
 
 
== Python Integrated development environments ==
 
 
 
 
 
 
 
PyCharm
 
 
 
'''Descrition''' = Software developers who are doing pure Python coding, as well as those who are just making their first steps in
 
programming, will no doubt appreciate this new Edition of PyCharm, which provides such essential IDE functionality as:
 
 
 
an intelligent editor with code completion and analysis
 
automated code refactorings
 
graphical debugger and unit testing support
 
native version control integrations, and much more...
 
 
 
'''URL''' = http://www.jetbrains.com/pycharm/
 
  
 
[[File:pycharm.png]]
 
[[File:pycharm.png]]
  
 +
'''Description'''
  
 +
The Python IDE for Professional Developers.
  
 +
http://www.jetbrains.com/pycharm/
  
 
== Auto Completion Add-ons ==
 
== Auto Completion Add-ons ==
  
 +
=== Kodistubs ===
  
Kodistubs
+
'''Description'''
  
'''Description''' = Kodi stubs are literally Python module stubs which mimic Kodi Python API modules. They contain most (hopefully, all) classes, methods, functions and constants declarations with docstrings, and minimal code not to raise syntax errors.
+
The main purpose of Kodistubs is to help you to write Kodi addon code in various IDEs by providing code completion, quick access to Kodi Python API docstrings, and code inspection (linting) in IDEs that provide this feature.
If you using some Python IDE (Eclipse+Pydev, Python Tools for Visual Studio, PyScripter etc.), you can add those modules to Python import paths of your current Kodi addon project, and you will get code auto-completion and quick help that greatly facilitates writing addon code and reduces the number of errors.
 
  
 +
When developing Python addons for Kodi it is strongly recommended to use virtual environments to isolate your development dependencies. Virtual environments are supported by all popular Python IDEs.
  
'''URL''' = http://forum.kodi.tv/showthread.php?tid=173780
+
'''Installation'''
 +
Within a python virtual environment of your add-on source code execute `pip install kodistubs`.  
  
 +
https://romanvm.github.io/Kodistubs
  
[[File:xbmcstubs.jpg]]
+
[[File:kodistubs.png]]
  
 
== Frameworks ==
 
== Frameworks ==
 
  
 
=== KodiSwift ===
 
=== KodiSwift ===
  
 +
'''Description'''
  
'''Description''' = KodiSwift is a small framework to ease development of Kodi addons. It is an xbmcswift2 fork with API updates. Whether you are an experienced addon developer, or just coding your first addon, you’ll find benefits to using kodiswift.
+
KodiSwift is a small framework to ease development of Kodi add-ons. It is an xbmcswift2 fork with API updates. Whether you are an experienced addon developer, or just coding your first addon, you’ll find benefits to using kodiswift.
  
 +
'''Homepage'''
  
'''URL''' = https://github.com/Sinap/kodiswift
+
https://xbmcswift2.readthedocs.io/
'''Tutorial'''(may be outdated) = http://xbmcswift2.readthedocs.io/en/latest/index.html
 
  
 
=== PyXBMCt ===
 
=== PyXBMCt ===
  
'''Description''' = PyXBMCt is a Python framework for simple Kodi addon UI building. It was inspired by PyQt (hence the name) and shares the same basic principles, so those who are familiar with PyQt/PySide should feel themselves right at home. The framework provides 4 base classes, 9 ready-to-use widgets or, in Kodi terms, controls, a Grid layout manager and an event connection manager.
+
'''Description'''
PyXBMCt uses texture images from XBMC’s default Confluence skin to decorate its visual elements. Those textures are included in PyXBMCt, so UI based on it will have the same look in different skins.
+
 
 +
PyXBMCt is a Python framework for simple Kodi addon UI building. It was inspired by PyQt (hence the name) and shares the same basic principles, so those who are familiar with PyQt/PySide should feel themselves right at home. The framework provides 4 base classes, 9 ready-to-use widgets or, in Kodi terms, controls, a Grid layout manager and an event connection manager. PyXBMCt uses texture images from Kodi’s default Confluence skin to decorate its visual elements. Those textures are included in PyXBMCt, so UI based on it will have the same look in different skins.
 +
 
 +
'''Homepage'''
 +
 
 +
https://romanvm.github.io/script.module.pyxbmct/
  
 +
== Debugging ==
  
'''URL''' = http://forum.kodi.tv/showthread.php?tid=174859
+
https://kodi.wiki/view/HOW-TO:Debug_Python_Scripts_with_Web-PDB

Revision as of 14:58, 18 November 2019

Home icon grey.png   ▶ Development ▶ Add-on development ▶ Development Tools

Below you will find software that can be useful in Add-on Development.

1 Python IDE's

1.1 Visual Studio Code

Platforms

  • Linux
  • Windows
  • macOS


Vsc.png

Description

Code editing. Redefined.Free. Built on open source. Runs everywhere. If you're not a pro or you are not used to work with another IDE, use this.

Note

Install the 'Python' extension by Microsoft.

A Visual Studio Code extension with rich support for the Python language (for all actively supported versions of the language: 2.7, >=3.5), including features such as IntelliSense, linting, debugging, code navigation, code formatting, Jupyter notebook support, refactoring, variable explorer, test explorer, snippets, and more!

Homepage

https://code.visualstudio.com/

1.2 PyCharm

Platforms

  • Linux
  • Windows
  • macOS

Pycharm.png

Description

The Python IDE for Professional Developers.

http://www.jetbrains.com/pycharm/

2 Auto Completion Add-ons

2.1 Kodistubs

Description

The main purpose of Kodistubs is to help you to write Kodi addon code in various IDEs by providing code completion, quick access to Kodi Python API docstrings, and code inspection (linting) in IDEs that provide this feature.

When developing Python addons for Kodi it is strongly recommended to use virtual environments to isolate your development dependencies. Virtual environments are supported by all popular Python IDEs.

Installation Within a python virtual environment of your add-on source code execute `pip install kodistubs`.

https://romanvm.github.io/Kodistubs

Kodistubs.png

3 Frameworks

3.1 KodiSwift

Description

KodiSwift is a small framework to ease development of Kodi add-ons. It is an xbmcswift2 fork with API updates. Whether you are an experienced addon developer, or just coding your first addon, you’ll find benefits to using kodiswift.

Homepage

https://xbmcswift2.readthedocs.io/

3.2 PyXBMCt

Description

PyXBMCt is a Python framework for simple Kodi addon UI building. It was inspired by PyQt (hence the name) and shares the same basic principles, so those who are familiar with PyQt/PySide should feel themselves right at home. The framework provides 4 base classes, 9 ready-to-use widgets or, in Kodi terms, controls, a Grid layout manager and an event connection manager. PyXBMCt uses texture images from Kodi’s default Confluence skin to decorate its visual elements. Those textures are included in PyXBMCt, so UI based on it will have the same look in different skins.

Homepage

https://romanvm.github.io/script.module.pyxbmct/

4 Debugging

https://kodi.wiki/view/HOW-TO:Debug_Python_Scripts_with_Web-PDB