plexhints
=========
.. image:: https://img.shields.io/github/actions/workflow/status/lizardbyte/plexhints/CI.yml.svg?branch=master&label=CI%20build&logo=github&style=for-the-badge
:alt: GitHub Workflow Status (CI)
:target: https://github.com/LizardByte/plexhints/actions/workflows/CI.yml?query=branch%3Amaster
.. image:: https://img.shields.io/readthedocs/plexhints.svg?label=Docs&style=for-the-badge&logo=readthedocs
:alt: Read the Docs
:target: http://plexhints.readthedocs.io/
.. image:: https://img.shields.io/codecov/c/gh/LizardByte/plexhints.svg?token=1LYYVYWY9D&style=for-the-badge&logo=codecov&label=codecov
:alt: Codecov
:target: https://codecov.io/gh/LizardByte/plexhints
.. image:: https://img.shields.io/github/downloads/lizardbyte/plexhints/total.svg?style=for-the-badge&logo=github
:alt: GitHub Releases
:target: https://github.com/LizardByte/plexhints/releases/latest
.. image:: https://img.shields.io/pypi/v/plexhints.svg?style=for-the-badge&logo=pypi&label=pypi%20package
:alt: PyPI
:target: https://pypi.org/project/plexhints/
.. image:: https://img.shields.io/pypi/dm/plexhints?style=for-the-badge&logo=pypi&label=pypi%20downloads
:alt: PyPI - Downloads
:target: https://pypi.org/project/plexhints/
Overview
--------
.. attention::
Plex is removing ALL support for plugins. This project is no longer maintained. See
`Plex Forum <https://forums.plex.tv/t/important-information-for-users-running-plex-media-server-on-nvidia-shield-devices/883484>`__
for more information.
Plexhints is a set of tools to aid in the development of plugins for Plex Media Server. It is not a framework, but
rather a set of tools that can be used to make your life easier.
Documentation is available on `Read the Docs <http://plexhints.readthedocs.io/>`__.
This project is not affiliated with Plex Inc.
Features
--------
- Python library providing type hints to aid in the development of Plex plugins. Get rid of all those IDE warnings
and errors!
- A GitHub Action that will install and bootstrap a Plex Media Server in a CI environment. The action can install
plugins and setup dummy libraries. Additionally the Plex token is provided as an output. This is useful for testing
your plugin or other Plex project in a CI environment.
:github_url: https://github.com/LizardByte/plexhints/blob/master/docs/source/about/installation.rst
Installation
============
Python Package
--------------
This library is available on PyPI as ``plexhints``. It can be installed in several ways.
**PyPI**
.. code-block:: bash
python -m pip install plexhints
**git**
.. code-block:: bash
python -m pip install git+https://github.com/lizardbyte/plexhints.git@dist#egg=plexhints
**github archive**
.. code-block:: bash
python -m pip install https://github.com/lizardbyte/plexhints/archive/dist.zip#egg=plexhints
:github_url: https://github.com/LizardByte/plexhints/blob/master/docs/source/about/usage.rst
Usage
=====
Plexhints can be used by just importing the ``plexhints`` module and running a couple of functions. After doing so
you can use plexhints in your IDE and run most of your code outside of Plex. This is useful for debugging and testing.
Main Entry Point
----------------
Place this at the top of your ``Contents/Code/__init__.py`` file. It is important to only import these when running
outside of Plex.
.. code-block:: python
# plex debugging
try:
import plexhints # noqa: F401
except ImportError:
pass
else: # the code is running outside of Plex
from plexhints import plexhints_setup, update_sys_path
plexhints_setup() # reads the plugin plist file and determine if plexhints should use elevated policy or not
update_sys_path() # when running outside plex, append the path
Submodules
----------
In files other than the main ``__init__.py`` file, you can simply import the ``plexhints`` module and use it as shown.
.. code-block:: python
# plex debugging
try:
import plexhints # noqa: F401
except ImportError:
pass
else: # the code is running outside of Plex
from plexhints.log_kit import Log
Available Imports
-----------------
.. code-block:: python
from plexhints.agent_kit import Agent, Media # agent kit
from plexhints.core_kit import Core # core kit
from plexhints.decorator_kit import handler, indirect, route # decorator kit
from plexhints.exception_kit import Ex # exception kit
from plexhints.locale_kit import Locale # locale kit
from plexhints.log_kit import Log # log kit
from plexhints.model_kit import Movie, VideoClip, VideoClipObject # model kit
from plexhints.network_kit import HTTP # network kit
from plexhints.object_kit import Callback, IndirectResponse, MediaObject, MessageContainer, MetadataItem, \
MetadataSearchResult, PartObject, SearchResult # object kit
from plexhints.parse_kit import HTML, JSON, Plist, RSS, XML, YAML # parse kit
from plexhints.prefs_kit import Prefs # prefs kit
from plexhints.proxy_kit import Proxy # proxy kit
from plexhints.resource_kit import Resource # resource kit
from plexhints.shortcut_kit import L, E, D, R, S # shortcut kit
from plexhints.util_kit import String, Util # util kit
from plexhints.constant_kit import CACHE_1MINUTE, CACHE_1HOUR, CACHE_1DAY, CACHE_1WEEK, CACHE_1MONTH # constant kit
from plexhints.constant_kit import ClientPlatforms, Protocols, OldProtocols, ServerPlatforms, ViewTypes, \
SummaryTextTypes, AudioCodecs, VideoCodecs, Containers, ContainerContents, \
StreamTypes # constant kit, more commonly used in URL services
# extra objects
from plexhints.extras_kit import BehindTheScenesObject, \
ConcertVideoObject, \
DeletedSceneObject, \
FeaturetteObject, \
InterviewObject, \
LiveMusicVideoObject, \
LyricMusicVideoObject, \
MusicVideoObject, \
OtherObject, \
SceneOrSampleObject, \
ShortObject, \
TrailerObject
Raw data
{
"_id": null,
"home_page": "https://github.com/LizardByte/plexhints",
"name": "plexhints",
"maintainer": null,
"docs_url": null,
"requires_python": ">=2.7",
"maintainer_email": null,
"keywords": "plex, agent, plug-in, debug",
"author": "LizardByte",
"author_email": "LizardByte@github.com",
"download_url": "https://files.pythonhosted.org/packages/df/fb/68ae2703386092d08f82465f45275162aa802d68f647fda512ce5fb2ce56/plexhints-2024.809.14117.tar.gz",
"platform": null,
"description": "plexhints\n=========\n.. image:: https://img.shields.io/github/actions/workflow/status/lizardbyte/plexhints/CI.yml.svg?branch=master&label=CI%20build&logo=github&style=for-the-badge\n :alt: GitHub Workflow Status (CI)\n :target: https://github.com/LizardByte/plexhints/actions/workflows/CI.yml?query=branch%3Amaster\n\n.. image:: https://img.shields.io/readthedocs/plexhints.svg?label=Docs&style=for-the-badge&logo=readthedocs\n :alt: Read the Docs\n :target: http://plexhints.readthedocs.io/\n\n.. image:: https://img.shields.io/codecov/c/gh/LizardByte/plexhints.svg?token=1LYYVYWY9D&style=for-the-badge&logo=codecov&label=codecov\n :alt: Codecov\n :target: https://codecov.io/gh/LizardByte/plexhints\n\n.. image:: https://img.shields.io/github/downloads/lizardbyte/plexhints/total.svg?style=for-the-badge&logo=github\n :alt: GitHub Releases\n :target: https://github.com/LizardByte/plexhints/releases/latest\n\n.. image:: https://img.shields.io/pypi/v/plexhints.svg?style=for-the-badge&logo=pypi&label=pypi%20package\n :alt: PyPI\n :target: https://pypi.org/project/plexhints/\n\n.. image:: https://img.shields.io/pypi/dm/plexhints?style=for-the-badge&logo=pypi&label=pypi%20downloads\n :alt: PyPI - Downloads\n :target: https://pypi.org/project/plexhints/\n\nOverview\n--------\n\n.. attention::\n\n Plex is removing ALL support for plugins. This project is no longer maintained. See\n `Plex Forum <https://forums.plex.tv/t/important-information-for-users-running-plex-media-server-on-nvidia-shield-devices/883484>`__\n for more information.\n\nPlexhints is a set of tools to aid in the development of plugins for Plex Media Server. It is not a framework, but\nrather a set of tools that can be used to make your life easier.\n\nDocumentation is available on `Read the Docs <http://plexhints.readthedocs.io/>`__.\n\nThis project is not affiliated with Plex Inc.\n\nFeatures\n--------\n- Python library providing type hints to aid in the development of Plex plugins. Get rid of all those IDE warnings\n and errors!\n- A GitHub Action that will install and bootstrap a Plex Media Server in a CI environment. The action can install\n plugins and setup dummy libraries. Additionally the Plex token is provided as an output. This is useful for testing\n your plugin or other Plex project in a CI environment.\n\n:github_url: https://github.com/LizardByte/plexhints/blob/master/docs/source/about/installation.rst\n\nInstallation\n============\n\nPython Package\n--------------\nThis library is available on PyPI as ``plexhints``. It can be installed in several ways.\n\n**PyPI**\n\n.. code-block:: bash\n\n python -m pip install plexhints\n\n**git**\n\n.. code-block:: bash\n\n python -m pip install git+https://github.com/lizardbyte/plexhints.git@dist#egg=plexhints\n\n**github archive**\n\n.. code-block:: bash\n\n python -m pip install https://github.com/lizardbyte/plexhints/archive/dist.zip#egg=plexhints\n\n:github_url: https://github.com/LizardByte/plexhints/blob/master/docs/source/about/usage.rst\n\nUsage\n=====\nPlexhints can be used by just importing the ``plexhints`` module and running a couple of functions. After doing so\nyou can use plexhints in your IDE and run most of your code outside of Plex. This is useful for debugging and testing.\n\nMain Entry Point\n----------------\nPlace this at the top of your ``Contents/Code/__init__.py`` file. It is important to only import these when running\noutside of Plex.\n\n.. code-block:: python\n\n # plex debugging\n try:\n import plexhints # noqa: F401\n except ImportError:\n pass\n else: # the code is running outside of Plex\n from plexhints import plexhints_setup, update_sys_path\n plexhints_setup() # reads the plugin plist file and determine if plexhints should use elevated policy or not\n update_sys_path() # when running outside plex, append the path\n\nSubmodules\n----------\nIn files other than the main ``__init__.py`` file, you can simply import the ``plexhints`` module and use it as shown.\n\n.. code-block:: python\n\n # plex debugging\n try:\n import plexhints # noqa: F401\n except ImportError:\n pass\n else: # the code is running outside of Plex\n from plexhints.log_kit import Log\n\nAvailable Imports\n-----------------\n\n.. code-block:: python\n\n from plexhints.agent_kit import Agent, Media # agent kit\n from plexhints.core_kit import Core # core kit\n from plexhints.decorator_kit import handler, indirect, route # decorator kit\n from plexhints.exception_kit import Ex # exception kit\n from plexhints.locale_kit import Locale # locale kit\n from plexhints.log_kit import Log # log kit\n from plexhints.model_kit import Movie, VideoClip, VideoClipObject # model kit\n from plexhints.network_kit import HTTP # network kit\n from plexhints.object_kit import Callback, IndirectResponse, MediaObject, MessageContainer, MetadataItem, \\\n MetadataSearchResult, PartObject, SearchResult # object kit\n from plexhints.parse_kit import HTML, JSON, Plist, RSS, XML, YAML # parse kit\n from plexhints.prefs_kit import Prefs # prefs kit\n from plexhints.proxy_kit import Proxy # proxy kit\n from plexhints.resource_kit import Resource # resource kit\n from plexhints.shortcut_kit import L, E, D, R, S # shortcut kit\n from plexhints.util_kit import String, Util # util kit\n\n from plexhints.constant_kit import CACHE_1MINUTE, CACHE_1HOUR, CACHE_1DAY, CACHE_1WEEK, CACHE_1MONTH # constant kit\n from plexhints.constant_kit import ClientPlatforms, Protocols, OldProtocols, ServerPlatforms, ViewTypes, \\\n SummaryTextTypes, AudioCodecs, VideoCodecs, Containers, ContainerContents, \\\n StreamTypes # constant kit, more commonly used in URL services\n\n # extra objects\n from plexhints.extras_kit import BehindTheScenesObject, \\\n ConcertVideoObject, \\\n DeletedSceneObject, \\\n FeaturetteObject, \\\n InterviewObject, \\\n LiveMusicVideoObject, \\\n LyricMusicVideoObject, \\\n MusicVideoObject, \\\n OtherObject, \\\n SceneOrSampleObject, \\\n ShortObject, \\\n TrailerObject\n\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Type hinting library for Plex plugin development.",
"version": "2024.809.14117",
"project_urls": {
"Homepage": "https://github.com/LizardByte/plexhints"
},
"split_keywords": [
"plex",
" agent",
" plug-in",
" debug"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "91544aba2789c474df75c8d5c121da0d1725e299d7da22b0bdf8a209a8ec1723",
"md5": "dc6a08f600d73fe9028b9e10f3c1b91e",
"sha256": "c70f358f11cdaec1d46116b6143ff29b34396fbb2f77af3b0249f78d6cd6e2c7"
},
"downloads": -1,
"filename": "plexhints-2024.809.14117-py2-none-any.whl",
"has_sig": false,
"md5_digest": "dc6a08f600d73fe9028b9e10f3c1b91e",
"packagetype": "bdist_wheel",
"python_version": "py2",
"requires_python": ">=2.7",
"size": 74228,
"upload_time": "2024-08-09T02:10:50",
"upload_time_iso_8601": "2024-08-09T02:10:50.367134Z",
"url": "https://files.pythonhosted.org/packages/91/54/4aba2789c474df75c8d5c121da0d1725e299d7da22b0bdf8a209a8ec1723/plexhints-2024.809.14117-py2-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dffb68ae2703386092d08f82465f45275162aa802d68f647fda512ce5fb2ce56",
"md5": "e1722a77e722eb4852dcd8e743b5a7d9",
"sha256": "e21e873a2f3e59debf87cf0e305c958ae2177cffb5be8283bcae4ff17e1c985b"
},
"downloads": -1,
"filename": "plexhints-2024.809.14117.tar.gz",
"has_sig": false,
"md5_digest": "e1722a77e722eb4852dcd8e743b5a7d9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=2.7",
"size": 49585,
"upload_time": "2024-08-09T02:10:52",
"upload_time_iso_8601": "2024-08-09T02:10:52.185231Z",
"url": "https://files.pythonhosted.org/packages/df/fb/68ae2703386092d08f82465f45275162aa802d68f647fda512ce5fb2ce56/plexhints-2024.809.14117.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-09 02:10:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "LizardByte",
"github_project": "plexhints",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "deprecation",
"specs": [
[
"==",
"2.1.0"
]
]
},
{
"name": "future",
"specs": [
[
"==",
"1.0.0"
]
]
},
{
"name": "simplejson",
"specs": [
[
"==",
"3.19.2"
]
]
},
{
"name": "BeautifulSoup4",
"specs": [
[
"==",
"4.9.3"
]
]
},
{
"name": "demjson",
"specs": [
[
"==",
"2.2.4"
]
]
},
{
"name": "feedparser",
"specs": [
[
"==",
"5.2.1"
]
]
},
{
"name": "lxml",
"specs": [
[
"==",
"4.9.4"
]
]
},
{
"name": "PyYAML",
"specs": [
[
"==",
"5.4.1"
]
]
},
{
"name": "requests",
"specs": [
[
"==",
"2.27.1"
]
]
},
{
"name": "requests-cache",
"specs": [
[
"==",
"0.5.2"
]
]
},
{
"name": "typing",
"specs": [
[
"==",
"3.10.0.0"
]
]
}
],
"lcname": "plexhints"
}