Development Tools: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
(Improve page layout and update wikilink targets)
 
(9 intermediate revisions by 4 users not shown)
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 IDEs ==
=== Visual Studio Code ===
[[File:vsc.png|right|600px]]
{| class="wikitable" style="float: left; max-width: 50vmax;"
| colspan="2" style="background-color: #fff; border-left: hidden; border-right: hidden; border-top: hidden; padding-bottom: 1.5em; text-align: center; vertical-align: top;" | {{Plainlist|[https://code.visualstudio.com/ Homepage]|[https://code.visualstudio.com/docs Documentation]|[https://code.visualstudio.com/download Downloads]|[https://marketplace.visualstudio.com/VSCode Extensions Marketplace]|style=font-size: 1.08em; font-weight: bold;}}
|-
! scope="row" style="min-width: 8em; padding: 0.5em 1em;" | Developer:
| style="padding: 0.5em 1em;" | Microsoft
|-
! scope="row" style="padding: 0.5em 1em;" | Platforms:
| style="padding: 0.5em 1em;" | {{Plainlist|Windows|Linux|macOS}}
|-
! scope="row" style="padding: 0.5em 1em;" | Price:
| style="padding: 0.5em 1em;" | Free
|-
! scope="row" style="padding: 0.5em 1em;" | Description:
| style="padding: 0.5em 1em;" | Code editing, redefined. Free and built on open source; runs everywhere. If you're not a pro or you are not used to working with another IDE, use this.
|-
! scope="row" style="padding: 0.5em 1em;" | Notes:
| style="padding: 0.5em 1em;" | Start by installing the '''[https://marketplace.visualstudio.com/items?itemName=ms-python.python Python]''' extension provided by Microsoft.
<blockquote>''A Visual Studio Code extension with rich support for the Python language (for all actively supported versions of the language: >=3.7), including features such as IntelliSense (Pylance), linting, debugging, code navigation, code formatting, refactoring, variable explorer, test explorer, and more!''</blockquote>
|}
<hr style="clear: both;" />


== Text Editors ==
=== PyCharm ===
[[File:pycharm.png|right|600px]]
{| class="wikitable" style="float: left; max-width: 50vmax;"
| colspan="2" style="background-color: #fff; border-left: hidden; border-right: hidden; border-top: hidden; padding-bottom: 1.5em; text-align: center; vertical-align: top;" | {{Plainlist|[https://www.jetbrains.com/pycharm/ Homepage]|[https://www.jetbrains.com/help/pycharm/ Documentation]|[https://www.jetbrains.com/pycharm/download/ Downloads]|[https://plugins.jetbrains.com/pycharm Plugin Marketplace]|style=font-size: 1.08em; font-weight: bold;}}
|-
! scope="row" style="min-width: 8em; padding: 0.5em 1em;" | Developer:
| style="padding: 0.5em 1em;" | JetBrains
|-
! scope="row" style="padding: 0.5em 1em;" | License:
| style="padding: 0.5em 1em;" | [https://sales.jetbrains.com/hc/en-gb/articles/206544679-What-is-our-licensing-model- Proprietary] (with [https://sales.jetbrains.com/hc/en-gb/articles/207240845-What-is-a-perpetual-fallback-license- Perpetual Fallback License])
|-
! scope="row" style="padding: 0.5em 1em;" | Platforms:
| style="padding: 0.5em 1em;" | {{Plainlist|Windows|Linux|macOS}}
|-
! scope="row" style="padding: 0.5em 1em;" | Price:
| style="padding: 0.5em 1em;" | Free — [https://www.jetbrains.com/community/opensource/ *requires approval]
|-
! scope="row" style="padding: 0.5em 1em;" | Description:
| style="padding: 0.5em 1em;" | PyCharm is a dedicated Python Integrated Development Environment (IDE) for smart and intelligent Python development, including code assistance, refactorings, visual debugging, and version control integration.
|}
<hr style="clear: both;" />


Sublime 3
=== Eclipse ===
[[File:Eclipse-PyDev.png|right|600px]]
{| class="wikitable" style="float: left; max-width: 50vmax;"
| colspan="2" style="background-color: #fff; border-left: hidden; border-right: hidden; border-top: hidden; padding-bottom: 1.5em; text-align: center; vertical-align: top;" | {{Plainlist|[https://eclipseide.org/ Homepage]|[https://help.eclipse.org/ Documentation]|[https://www.eclipse.org/downloads Downloads]|[https://marketplace.eclipse.org/ Extensions Marketplace]|style=font-size: 1.08em; font-weight: bold;}}
|-
! scope="row" style="min-width: 8em; padding: 0.5em 1em;" | Developer:
| style="padding: 0.5em 1em;" | Eclipse Foundation
|-
! scope="row" style="padding: 0.5em 1em;" | License:
| style="padding: 0.5em 1em;" | [https://spdx.org/licenses/EPL-2.0.html Eclipse Public License 2.0] (EPL-2.0)
|-
! scope="row" style="padding: 0.5em 1em;" | Platforms:
| style="padding: 0.5em 1em;" | {{Plainlist|Windows|Linux|macOS}}
|-
! scope="row" style="padding: 0.5em 1em;" | Architectures:
| style="padding: 0.5em 1em;" | {{Plainlist|x86 64-bit (x86_64)|ARM 64-bit (AArch64)}}
|-
! scope="row" style="padding: 0.5em 1em;" | Price:
| style="padding: 0.5em 1em;" | Free
|-
! scope="row" style="padding: 0.5em 1em;" | Description:
| style="padding: 0.5em 1em;" | Eclipse is an integrated development environment developed by the not-for-profit Eclipse Foundation, originally targeting Java. It contains a base workspace and an extensible plug-in system for customizing the environment to suit work on a wide spectrum of popular programming languages.
|-
! scope="row" style="padding: 0.5em 1em;" | Notes:
| style="padding: 0.5em 1em;" | Start by installing the '''[https://marketplace.eclipse.org/content/pydev-python-ide-eclipse PyDev]''' extension provided by Brainwy Software.
{{Plainlist|[https://www.pydev.org/ Homepage]|[https://www.pydev.org/manual.html Documentation]|[https://www.pydev.org/download.html Downloads]|[https://pydev.blogspot.com Blog]|[https://sourceforge.net/p/pydev/mailman/pydev-code/ Mailing List]|[https://github.com/fabioz/Pydev Source Code Repository]|style=font-size: 1.03em; font-weight: bold; margin: 0.5em; text-align: center; width: auto;}}
<blockquote>''PyDev enables Eclipse to support Python (and is among the leading tools for Python coding). It's also an open source project created by Aleks Totic in 2003 and kept going by Fabio Zadrozny since 2005.''</blockquote>
|}
<hr style="clear: both;" />


'''Description''' = Sublime Text is a sophisticated text editor for code, markup and prose.
=== Visual Studio ===
You'll love the slick user interface, extraordinary features and amazing performance.
:{{Main|HOW-TO:Python Development in Visual Studio}}


'''URL''' = http://www.sublimetext.com/3
== Auto Completion Add-ons ==
=== Kodistubs ===
[[File:kodistubs.png|right|600px]]
{| class="wikitable" style="float: left; max-width: 50vmax;"
| colspan="2" style="background-color: #fff; border-left: hidden; border-right: hidden; border-top: hidden; padding-bottom: 1.5em; text-align: center; vertical-align: top;" | {{Plainlist|[https://github.com/romanvm/Kodistubs Repository]|[http://romanvm.github.io/Kodistubs/ Documentation]|[https://pypi.org/project/Kodistubs/ PyPI Package]|[[forum:173780|Kodi Forum Thread]]|style=font-size: 1.08em; font-weight: bold;}}
|-
! scope="row" style="min-width: 8em; padding: 0.5em 1em;" | Developer:
| style="padding: 0.5em 1em;" | [[User:Roman V M|Roman Miroshnychenko]]<ref name="romanvm-pypi" />
|-
! scope="row" style="padding: 0.5em 1em;" | License:
| style="padding: 0.5em 1em;" | [https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later]
|-
! scope="row" style="padding: 0.5em 1em;" | Platforms:
| style="padding: 0.5em 1em;" | Python ≥ v3.6
|-
! scope="row" style="padding: 0.5em 1em;" | Price:
| style="padding: 0.5em 1em;" | Free
|-
! scope="row" style="padding: 0.5em 1em;" | Description:
| style="padding: 0.5em 1em;" | 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.
|-
! scope="row" style="padding: 0.5em 1em;" | Notes:
| style="padding: 0.5em 1em;" | <blockquote>''When developing Python addons for Kodi, it is <span style="text-decoration: underline;">strongly recommended</span> to use virtual environments to isolate your development dependencies. Virtual environments are supported by all popular Python IDEs.''</blockquote>


'''Installation:'''


[[File:sublimetext.png]]
:Within a python virtual environment of your add-on source code execute <syntaxhighlight lang="shell" inline>pip install -U kodistubs</syntaxhighlight>.
|-
| colspan="2" style="background-color: #fff; border-bottom: hidden; border-left: hidden; border-right: hidden; font-size: 0.9em; padding: 0.75em; text-align: left; vertical-align: top;" | <div class="reflist" style="column-width: 24em;"><references><ref name="romanvm-pypi">[https://pypi.org/user/romanvm/ PyPI Profile: romanvm]</ref></references></div>
|}
<br style="clear: both;" />


== Frameworks ==


=== KodiSwift ===


'''Description'''


NotePad++
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.


'''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.
'''Homepage'''
 
'''URL''' = http://notepad-plus-plus.org/
 
 
 
[[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]]


https://xbmcswift2.readthedocs.io/


=== PyXBMCt ===


'''Description'''


== Auto Completion Add-ons ==
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'''


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


'''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.
=== Codequick ===
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.


'''Description'''


'''URL''' = http://forum.kodi.tv/showthread.php?tid=173780
Codequick is a framework for kodi add-on's. The goal for this framework is to simplify add-on development. This is achieved by reducing the amount of boilerplate code to a minimum, while automating as many tasks that can be automated. Ultimately, allowing the developer to focus primarily on scraping content from websites and passing it to Kodi.


* Route dispatching (callbacks)
* Callback arguments can be any Python object that can be "pickled"
* Delayed execution (execute code after callbacks have returned results)
* No need to set "isplayable" or "isfolder" properties
* Supports both Python 2 and 3
* Auto sort method selection
* Better error reporting
* Full unicode support
* Sets "mediatype" to "video" or "music" depending on listitem type if not set
* Sets "xbmcplugin.setContent" base off mediatype infolabel.
* Sets "xbmcplugin.setPluginCategory" to the title of current folder
* Sets "thumbnail" to add-on icon image if not set
* Sets "fanart" to add-on fanart image if not set
* Sets "icon" to "DefaultFolder.png" or "DefaultVideo.png’ if not set
* Sets "plot" to the listitem title if not set
* Auto type convertion for (str, unicode, int, float, long) infolables and stream info
* Support for media flags e.g. High definition '720p', audio channels '2.0'
* Reimplementation of the listitem class, that makes heavy use of dictionaries
* Built-in support for saved searches
* Youtube.DL intergration (https://forum.kodi.tv/showthread.php?tid=200877)
* URLQuick intergration (http://urlquick.readthedocs.io/en/stable/)
* Youtube intergration
* Supports use of "reuselanguageinvoker"


[[File:xbmcstubs.jpg]]
'''Homepage'''


== Frameworks ==
https://scriptmodulecodequick.readthedocs.io
 
 
=== XBMCSwift ===
 
 
'''Description''' = xbmcswift2 is a small framework to ease development of Kodi addons. Whether you are an experienced addon developer, or just coding your first addon, you’ll find benefits to using xbmcswift2.
 
 
'''URL''' = https://github.com/jbeluch/xbmcswift2
 
=== 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.
== Debugging ==
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.
* [[HOW-TO:Debug Python Scripts with Web-PDB|HOW-TO: Debug Python Scripts with Web-PDB]]
* [[Archive:Debug Python Scripts with Eclipse|Debug Python Scripts with Eclipse]]




'''URL''' = http://forum.kodi.tv/showthread.php?tid=174859
[[Category:Development]]

Latest revision as of 00:14, 11 September 2022

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

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

Python IDEs

Visual Studio Code

Vsc.png
Developer: Microsoft
Platforms:
  • Windows
  • Linux
  • macOS
Price: Free
Description: Code editing, redefined. Free and built on open source; runs everywhere. If you're not a pro or you are not used to working with another IDE, use this.
Notes: Start by installing the Python extension provided by Microsoft.

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


PyCharm

Pycharm.png
Developer: JetBrains
License: Proprietary (with Perpetual Fallback License)
Platforms:
  • Windows
  • Linux
  • macOS
Price: Free — *requires approval
Description: PyCharm is a dedicated Python Integrated Development Environment (IDE) for smart and intelligent Python development, including code assistance, refactorings, visual debugging, and version control integration.

Eclipse

Eclipse-PyDev.png
Developer: Eclipse Foundation
License: Eclipse Public License 2.0 (EPL-2.0)
Platforms:
  • Windows
  • Linux
  • macOS
Architectures:
  • x86 64-bit (x86_64)
  • ARM 64-bit (AArch64)
Price: Free
Description: Eclipse is an integrated development environment developed by the not-for-profit Eclipse Foundation, originally targeting Java. It contains a base workspace and an extensible plug-in system for customizing the environment to suit work on a wide spectrum of popular programming languages.
Notes: Start by installing the PyDev extension provided by Brainwy Software.

PyDev enables Eclipse to support Python (and is among the leading tools for Python coding). It's also an open source project created by Aleks Totic in 2003 and kept going by Fabio Zadrozny since 2005.


Visual Studio

Auto Completion Add-ons

Kodistubs

Kodistubs.png
Developer: Roman Miroshnychenko[1]
License: GPL-3.0-or-later
Platforms: Python ≥ v3.6
Price: Free
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.
Notes:

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 -U kodistubs.


Frameworks

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/

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/

Codequick

Description

Codequick is a framework for kodi add-on's. The goal for this framework is to simplify add-on development. This is achieved by reducing the amount of boilerplate code to a minimum, while automating as many tasks that can be automated. Ultimately, allowing the developer to focus primarily on scraping content from websites and passing it to Kodi.

  • Route dispatching (callbacks)
  • Callback arguments can be any Python object that can be "pickled"
  • Delayed execution (execute code after callbacks have returned results)
  • No need to set "isplayable" or "isfolder" properties
  • Supports both Python 2 and 3
  • Auto sort method selection
  • Better error reporting
  • Full unicode support
  • Sets "mediatype" to "video" or "music" depending on listitem type if not set
  • Sets "xbmcplugin.setContent" base off mediatype infolabel.
  • Sets "xbmcplugin.setPluginCategory" to the title of current folder
  • Sets "thumbnail" to add-on icon image if not set
  • Sets "fanart" to add-on fanart image if not set
  • Sets "icon" to "DefaultFolder.png" or "DefaultVideo.png’ if not set
  • Sets "plot" to the listitem title if not set
  • Auto type convertion for (str, unicode, int, float, long) infolables and stream info
  • Support for media flags e.g. High definition '720p', audio channels '2.0'
  • Reimplementation of the listitem class, that makes heavy use of dictionaries
  • Built-in support for saved searches
  • Youtube.DL intergration (https://forum.kodi.tv/showthread.php?tid=200877)
  • URLQuick intergration (http://urlquick.readthedocs.io/en/stable/)
  • Youtube intergration
  • Supports use of "reuselanguageinvoker"

Homepage

https://scriptmodulecodequick.readthedocs.io

Debugging