GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing streamlink.github.io — Developing - Streamlink 8.6.3 documentation Developing¶Setup¶Setting up the repository¶In order to start working on Streamlink, you must first install the latest stable version of mkdir streamlink cd streamlink git clone --origin=upstream 'https://github.com/streamlink/streamlink.git' . git remote add fork '[email protected]:<YOUR-USERNAME>/streamlink.git' git remote -v git fetch --all When submitting a pull request, commit and push your changes onto a different branch. git checkout master git pull upstream master git checkout -b new/feature/or/bugfix/branch git add ./foo git commit git push fork new/feature/or/bugfix/branch Setting up a new environment¶Before starting any work on the project, a virtual environment must be set up which is isolated from the Python environment of the host system. This ensures that development can be done in a clean space which is free of version conflicts and other unrelated packages. First, make sure that you have the latest stable versions of Python and uv installed. Depending on the host system and developer preferences, uv may be used to install Python itself (see its own docs). uv is not a strict requirement. Other Python package managers like pip for example can be used, but since Streamlink pins its dependencies in a uv lock file, dependency issues can be fully avoided this way. python --version uv --version Now create a virtual environment by syncing all dependencies from Streamlink's uv sync --all-extras --all-groups Alternatively, a custom, self-managed Python environment can be set up by using Python's own venv and then activating it: # replace ~/venvs/streamlink with your path of choice and give it a proper name python -m venv ~/venvs/streamlink # POSIX compliant shells on non-Windows systems source ~/venvs/streamlink/bin/activate # non-POSIX shells have their own activation script, e.g. FISH source ~/venvs/streamlink/bin/activate.fish # on Windows, activation scripts are located in the Scripts/ subdirectory instead of bin/ ~\venvs\streamlink\Scripts\Activate.ps1 # sync to the active environment instead (--active) uv sync --active --all-extras --all-groups Verify that Streamlink is working and that all dependencies have been installed: streamlink --loglevel=debug Please remember to always re-sync the environment when fetching/pulling new commits or when switching branches. Validating changes¶Before submitting a pull request, please run tests, perform code linting and build the documentation on your system first, to see if your changes contain any mistakes or errors. This will be done automatically for each pull request on each change, but performing these checks locally avoids unnecessary build failures. The # run automated tests uv run pytest # or just run a subset of all tests uv run pytest path/to/test-file.py::TestClassName::test_method_name ... # check code for linting errors uv run ruff check # check code for formatting errors uv run ruff format --diff # check code for typing errors uv run ty check uv run mypy # build the documentation uv run make --directory=docs clean html # check the documentation python -m http.server 8000 --bind '127.0.0.1' --directory 'docs/_build/html/' "${BROWSER}" http://127.0.0.1:8000/ Code style¶Streamlink uses Ruff as primary code linting and formatting tool. The project aims to use best practices for achieving great code readability with minimal git diffs, as detailed in PEP 8 and implemented in related linting and formatting tools, such as Black. For detailed linting and formatting configurations specific to Streamlink, please have a look at pyproject.toml. It might be helpful to new plugin authors to pick a small and recently modified existing plugin to use as an initial template from which to work. If care is taken to preserve existing blank lines during modification, the main plugin structure should be compliant-ready for linting. Git commit style¶To improve git history and changelog legibility, Streamlink enforces a specific commit message format. It is a variation of conventional commits using component/package prefixes instead of conventional types and scopes. Commit messages must begin with a lowercase prefix, followed by a colon and a space, and end with a subject description. The target line length is 50 characters, with a hard maximum of 72 characters. The prefix must be a dot-separated pseudo-Python-import-path of the modified file path,
ignoring the Subject descriptions must start with a lowercase imperative verb (e.g. "add", "remove", "refactor") communicating the nature of the change, and end without punctuation. For example: session.http: fix set_interface on macOS plugins.twitch: switch to usher v2 endpoints ci.github: run preview-builds on uv.lock updates Optional message bodies must be separated from the subject by a blank line, with lines wrapped at 72 characters.
Markdown formatting is supported. Standardized footers (e.g.
Plugins¶Adding plugins¶
Removing plugins¶
|
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |