plexhints


Nameplexhints JSON
Version 2024.229.193202 PyPI version JSON
download
home_pagehttps://github.com/LizardByte/plexhints
SummaryType hinting library for Plex plugin development.
upload_time2024-02-29 19:41:03
maintainer
docs_urlNone
authorLizardByte
requires_python>=2.7
license
keywords plex agent plug-in debug
VCS
bugtrack_url
requirements deprecation future lxml simplejson BeautifulSoup4 BeautifulSoup4 demjson demjson3 feedparser feedparser PyYAML PyYAML requests requests requests-cache requests-cache typing
Travis-CI No Travis.
coveralls test coverage No coveralls.
            :github_url: https://github.com/LizardByte/plexhints/tree/nightly/README.rst

Overview
========
LizardByte has the full documentation hosted on `Read the Docs <http://plexhints.readthedocs.io/>`__.

About
-----
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.

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.

Integrations
------------

.. 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/

:github_url: https://github.com/LizardByte/plexhints/tree/nightly/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/tree/nightly/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": "",
    "docs_url": null,
    "requires_python": ">=2.7",
    "maintainer_email": "",
    "keywords": "plex,agent,plug-in,debug",
    "author": "LizardByte",
    "author_email": "LizardByte@github.com",
    "download_url": "https://files.pythonhosted.org/packages/e6/3d/ef7492f792976457931d33c1587ae8469c6c82cb4d23c5e44807c31a34e3/plexhints-2024.229.193202.tar.gz",
    "platform": null,
    "description": ":github_url: https://github.com/LizardByte/plexhints/tree/nightly/README.rst\n\nOverview\n========\nLizardByte has the full documentation hosted on `Read the Docs <http://plexhints.readthedocs.io/>`__.\n\nAbout\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\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\nIntegrations\n------------\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:github_url: https://github.com/LizardByte/plexhints/tree/nightly/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/tree/nightly/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": "",
    "summary": "Type hinting library for Plex plugin development.",
    "version": "2024.229.193202",
    "project_urls": {
        "Homepage": "https://github.com/LizardByte/plexhints"
    },
    "split_keywords": [
        "plex",
        "agent",
        "plug-in",
        "debug"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "971e62b0a6a2650ea35c0defe5c36a55bf214c6d217a31121336492fe16a10e4",
                "md5": "a700df7054a6e10471a91a1764c18cb5",
                "sha256": "65f5f453346d8d9f8b946a35edc159f6481ba0fc75a4a078de9ff2e81db17759"
            },
            "downloads": -1,
            "filename": "plexhints-2024.229.193202-py2-none-any.whl",
            "has_sig": false,
            "md5_digest": "a700df7054a6e10471a91a1764c18cb5",
            "packagetype": "bdist_wheel",
            "python_version": "py2",
            "requires_python": ">=2.7",
            "size": 74041,
            "upload_time": "2024-02-29T19:41:01",
            "upload_time_iso_8601": "2024-02-29T19:41:01.692812Z",
            "url": "https://files.pythonhosted.org/packages/97/1e/62b0a6a2650ea35c0defe5c36a55bf214c6d217a31121336492fe16a10e4/plexhints-2024.229.193202-py2-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e63def7492f792976457931d33c1587ae8469c6c82cb4d23c5e44807c31a34e3",
                "md5": "cf92a4b31cbd4d2aeef72447dc6c40bf",
                "sha256": "52006898b5baaa5f8450279eb3126b1decf7784b05a12d4231b9e29b810d417e"
            },
            "downloads": -1,
            "filename": "plexhints-2024.229.193202.tar.gz",
            "has_sig": false,
            "md5_digest": "cf92a4b31cbd4d2aeef72447dc6c40bf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=2.7",
            "size": 49250,
            "upload_time": "2024-02-29T19:41:03",
            "upload_time_iso_8601": "2024-02-29T19:41:03.277587Z",
            "url": "https://files.pythonhosted.org/packages/e6/3d/ef7492f792976457931d33c1587ae8469c6c82cb4d23c5e44807c31a34e3/plexhints-2024.229.193202.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-29 19:41:03",
    "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": "lxml",
            "specs": [
                [
                    "==",
                    "4.9.4"
                ]
            ]
        },
        {
            "name": "simplejson",
            "specs": [
                [
                    "==",
                    "3.19.2"
                ]
            ]
        },
        {
            "name": "BeautifulSoup4",
            "specs": [
                [
                    "==",
                    "4.9.3"
                ]
            ]
        },
        {
            "name": "BeautifulSoup4",
            "specs": [
                [
                    "==",
                    "4.12.2"
                ]
            ]
        },
        {
            "name": "demjson",
            "specs": [
                [
                    "==",
                    "2.2.4"
                ]
            ]
        },
        {
            "name": "demjson3",
            "specs": [
                [
                    "==",
                    "3.0.6"
                ]
            ]
        },
        {
            "name": "feedparser",
            "specs": [
                [
                    "==",
                    "5.2.1"
                ]
            ]
        },
        {
            "name": "feedparser",
            "specs": [
                [
                    "==",
                    "6.0.11"
                ]
            ]
        },
        {
            "name": "PyYAML",
            "specs": [
                [
                    "==",
                    "5.4.1"
                ]
            ]
        },
        {
            "name": "PyYAML",
            "specs": [
                [
                    "==",
                    "6.0.1"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.27.1"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.31.0"
                ]
            ]
        },
        {
            "name": "requests-cache",
            "specs": [
                [
                    "==",
                    "0.5.2"
                ]
            ]
        },
        {
            "name": "requests-cache",
            "specs": [
                [
                    "==",
                    "1.1.1"
                ]
            ]
        },
        {
            "name": "typing",
            "specs": [
                [
                    "==",
                    "3.10.0.0"
                ]
            ]
        }
    ],
    "lcname": "plexhints"
}
        
Elapsed time: 0.21373s