stream-localhost


Namestream-localhost JSON
Version 2.1 PyPI version JSON
download
home_page
SummaryPython module to, stream videos via authenticated sessions using FastAPI
upload_time2024-02-23 17:29:17
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT License Copyright (c) 2020 Vignesh Rao Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords video-streaming localhost
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            **Deployments**

[![book][gha_pages_badge]][gha_pages]
[![pypi][gha_pypi_badge]][gha_pypi]
[![none-shall-pass][gha_none_shall_pass_badge]][gha_none_shall_pass]

[![PyPI version shields.io](https://img.shields.io/pypi/v/stream-localhost)][pypi]
[![Pypi-format](https://img.shields.io/pypi/format/stream-localhost)](https://pypi.org/project/stream-localhost/#files)
[![Pypi-status](https://img.shields.io/pypi/status/stream-localhost)][pypi]

# PyStream
Python module to, stream videos via authenticated sessions using FastAPI

## Install
```shell
pip install stream-localhost
```

## Sample Usage
```python
import asyncio
import os
import pystream

if __name__ == '__main__':
    kwargs = dict(
        authorization={"Alan Turing": "Pr0gRamM1ng", "Linus Torvalds": "LinuxOS"},
        video_source=os.path.join(os.path.expanduser('~'), 'Downloads')
    )
    # Add the following to host on local IP address, skip for localhost (127.0.0.1)
    # kwargs["video_host"] = pystream.utils.get_local_ip()
    asyncio.run(pystream.start(**kwargs))
```

### Env Variables
> :bulb: &nbsp; Environment variables can _(optionally)_ be loaded from any plain text file.<br>
> Refer the [wiki page][wiki] for more information.

**Mandatory**
- **AUTHORIZATION**: Dictionary of key-value pairs with `username` as key and `password` as value.
- **VIDEO_SOURCE**: Source path for video files.
> :bulb: &nbsp; Files starting with `_` _(underscore)_ and `.` _(dot)_ will be ignored

**Optional**
- **VIDEO_HOST**: IP address to host the video. Defaults to `127.0.0.1`
- **VIDEO_PORT**: Port number to host the application. Defaults to `8000`
- **FILE_FORMATS**: Sequence of supported video file formats. Defaults to `(.mp4, .mov)`
- **WORKERS**: Number of workers to spin up the `uvicorn` server. Defaults to `1`
- **WEBSITES**: List of websites (_supports regex_) to add to CORS configuration. _Required only if tunneled via CDN_
- **AUTO_THUMBNAIL**: Boolean flag to auto generate thumbnail images for preview. Defaults to `True`
- **KEY_FILE**: Path to the private key file for SSL certificate. Defaults to `None`
- **CERT_FILE**: Path to the full chain file for SSL certificate. Defaults to `None`
- **SECURE_SESSION**: Boolean flag to secure the cookie `session_token`. Defaults to `False`
> :bulb: &nbsp; If `SECURE_SESSION` to set to `true`, the cookie `session_token` will only be sent via HTTPS<br>
> This means that the server can **ONLY** be hosted via `HTTPS` or `localhost`

## Coding Standards
Docstring format: [`Google`][google-docs] <br>
Styling conventions: [`PEP 8`][pep8] and [`isort`][isort]

## [Release Notes][release-notes]
**Requirement**
```shell
pip install gitverse
```

**Usage**
```shell
gitverse-release reverse -f release_notes.rst -t 'Release Notes'
```

## Linting
`pre-commit` will ensure linting, run pytest, generate runbook & release notes, and validate hyperlinks in ALL
markdown files (including Wiki pages)

**Requirement**
```shell
pip install sphinx==5.1.1 pre-commit recommonmark
```

**Usage**
```shell
pre-commit run --all-files
```

## Pypi Package
[![pypi-module](https://img.shields.io/badge/Software%20Repository-pypi-1f425f.svg)][pypi-repo]

[https://pypi.org/project/stream-localhost/][pypi]

## Runbook
[![made-with-sphinx-doc](https://img.shields.io/badge/Code%20Docs-Sphinx-1f425f.svg)][sphinx]

[https://thevickypedia.github.io/PyStream/][runbook]

## License & copyright

&copy; Vignesh Rao

Licensed under the [MIT License][license]

[license]: https://github.com/thevickypedia/pystream/blob/master/LICENSE
[pypi]: https://pypi.org/project/stream-localhost
[pypi-repo]: https://packaging.python.org/tutorials/packaging-projects/
[release-notes]: https://github.com/thevickypedia/pystream/blob/master/release_notes.rst
[gha_pages]: https://github.com/thevickypedia/pystream/actions/workflows/pages/pages-build-deployment
[gha_pages_badge]: https://github.com/thevickypedia/pystream/actions/workflows/pages/pages-build-deployment/badge.svg
[gha_pypi]: https://github.com/thevickypedia/pystream/actions/workflows/python-publish.yml
[gha_pypi_badge]: https://github.com/thevickypedia/pystream/actions/workflows/python-publish.yml/badge.svg
[gha_none_shall_pass]: https://github.com/thevickypedia/pystream/actions/workflows/markdown.yml
[gha_none_shall_pass_badge]: https://github.com/thevickypedia/pystream/actions/workflows/markdown.yml/badge.svg
[google-docs]: https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings
[pep8]: https://www.python.org/dev/peps/pep-0008/
[isort]: https://pycqa.github.io/isort/
[sphinx]: https://www.sphinx-doc.org/en/master/man/sphinx-autogen.html
[runbook]: https://thevickypedia.github.io/PyStream/
[wiki]: https://github.com/thevickypedia/pystream/wiki

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "stream-localhost",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "video-streaming,localhost",
    "author": "",
    "author_email": "Vignesh Rao <svignesh1793@gmail.com>",
    "download_url": "",
    "platform": null,
    "description": "**Deployments**\n\n[![book][gha_pages_badge]][gha_pages]\n[![pypi][gha_pypi_badge]][gha_pypi]\n[![none-shall-pass][gha_none_shall_pass_badge]][gha_none_shall_pass]\n\n[![PyPI version shields.io](https://img.shields.io/pypi/v/stream-localhost)][pypi]\n[![Pypi-format](https://img.shields.io/pypi/format/stream-localhost)](https://pypi.org/project/stream-localhost/#files)\n[![Pypi-status](https://img.shields.io/pypi/status/stream-localhost)][pypi]\n\n# PyStream\nPython module to, stream videos via authenticated sessions using FastAPI\n\n## Install\n```shell\npip install stream-localhost\n```\n\n## Sample Usage\n```python\nimport asyncio\nimport os\nimport pystream\n\nif __name__ == '__main__':\n    kwargs = dict(\n        authorization={\"Alan Turing\": \"Pr0gRamM1ng\", \"Linus Torvalds\": \"LinuxOS\"},\n        video_source=os.path.join(os.path.expanduser('~'), 'Downloads')\n    )\n    # Add the following to host on local IP address, skip for localhost (127.0.0.1)\n    # kwargs[\"video_host\"] = pystream.utils.get_local_ip()\n    asyncio.run(pystream.start(**kwargs))\n```\n\n### Env Variables\n> :bulb: &nbsp; Environment variables can _(optionally)_ be loaded from any plain text file.<br>\n> Refer the [wiki page][wiki] for more information.\n\n**Mandatory**\n- **AUTHORIZATION**: Dictionary of key-value pairs with `username` as key and `password` as value.\n- **VIDEO_SOURCE**: Source path for video files.\n> :bulb: &nbsp; Files starting with `_` _(underscore)_ and `.` _(dot)_ will be ignored\n\n**Optional**\n- **VIDEO_HOST**: IP address to host the video. Defaults to `127.0.0.1`\n- **VIDEO_PORT**: Port number to host the application. Defaults to `8000`\n- **FILE_FORMATS**: Sequence of supported video file formats. Defaults to `(.mp4, .mov)`\n- **WORKERS**: Number of workers to spin up the `uvicorn` server. Defaults to `1`\n- **WEBSITES**: List of websites (_supports regex_) to add to CORS configuration. _Required only if tunneled via CDN_\n- **AUTO_THUMBNAIL**: Boolean flag to auto generate thumbnail images for preview. Defaults to `True`\n- **KEY_FILE**: Path to the private key file for SSL certificate. Defaults to `None`\n- **CERT_FILE**: Path to the full chain file for SSL certificate. Defaults to `None`\n- **SECURE_SESSION**: Boolean flag to secure the cookie `session_token`. Defaults to `False`\n> :bulb: &nbsp; If `SECURE_SESSION` to set to `true`, the cookie `session_token` will only be sent via HTTPS<br>\n> This means that the server can **ONLY** be hosted via `HTTPS` or `localhost`\n\n## Coding Standards\nDocstring format: [`Google`][google-docs] <br>\nStyling conventions: [`PEP 8`][pep8] and [`isort`][isort]\n\n## [Release Notes][release-notes]\n**Requirement**\n```shell\npip install gitverse\n```\n\n**Usage**\n```shell\ngitverse-release reverse -f release_notes.rst -t 'Release Notes'\n```\n\n## Linting\n`pre-commit` will ensure linting, run pytest, generate runbook & release notes, and validate hyperlinks in ALL\nmarkdown files (including Wiki pages)\n\n**Requirement**\n```shell\npip install sphinx==5.1.1 pre-commit recommonmark\n```\n\n**Usage**\n```shell\npre-commit run --all-files\n```\n\n## Pypi Package\n[![pypi-module](https://img.shields.io/badge/Software%20Repository-pypi-1f425f.svg)][pypi-repo]\n\n[https://pypi.org/project/stream-localhost/][pypi]\n\n## Runbook\n[![made-with-sphinx-doc](https://img.shields.io/badge/Code%20Docs-Sphinx-1f425f.svg)][sphinx]\n\n[https://thevickypedia.github.io/PyStream/][runbook]\n\n## License & copyright\n\n&copy; Vignesh Rao\n\nLicensed under the [MIT License][license]\n\n[license]: https://github.com/thevickypedia/pystream/blob/master/LICENSE\n[pypi]: https://pypi.org/project/stream-localhost\n[pypi-repo]: https://packaging.python.org/tutorials/packaging-projects/\n[release-notes]: https://github.com/thevickypedia/pystream/blob/master/release_notes.rst\n[gha_pages]: https://github.com/thevickypedia/pystream/actions/workflows/pages/pages-build-deployment\n[gha_pages_badge]: https://github.com/thevickypedia/pystream/actions/workflows/pages/pages-build-deployment/badge.svg\n[gha_pypi]: https://github.com/thevickypedia/pystream/actions/workflows/python-publish.yml\n[gha_pypi_badge]: https://github.com/thevickypedia/pystream/actions/workflows/python-publish.yml/badge.svg\n[gha_none_shall_pass]: https://github.com/thevickypedia/pystream/actions/workflows/markdown.yml\n[gha_none_shall_pass_badge]: https://github.com/thevickypedia/pystream/actions/workflows/markdown.yml/badge.svg\n[google-docs]: https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings\n[pep8]: https://www.python.org/dev/peps/pep-0008/\n[isort]: https://pycqa.github.io/isort/\n[sphinx]: https://www.sphinx-doc.org/en/master/man/sphinx-autogen.html\n[runbook]: https://thevickypedia.github.io/PyStream/\n[wiki]: https://github.com/thevickypedia/pystream/wiki\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2020 Vignesh Rao  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Python module to, stream videos via authenticated sessions using FastAPI",
    "version": "2.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/thevickypedia/pystream/issues",
        "Docs": "https://thevickypedia.github.io/PyStream/",
        "Homepage": "https://github.com/thevickypedia/pystream",
        "Release Notes": "https://github.com/thevickypedia/pystream/blob/main/release_notes.rst",
        "Source": "https://github.com/thevickypedia/pystream"
    },
    "split_keywords": [
        "video-streaming",
        "localhost"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "85ff09458c782c3e0b6d64bc75813a8766b20ac0a0f339b999027cd7b64e036f",
                "md5": "d87a1484bbacd5719e31d2afb6e668bc",
                "sha256": "4ed6ecce6f97e99c347bf4c9a7955b177c0bf4ea1590f933fc88dddde638b7fb"
            },
            "downloads": -1,
            "filename": "stream_localhost-2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d87a1484bbacd5719e31d2afb6e668bc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 35380,
            "upload_time": "2024-02-23T17:29:17",
            "upload_time_iso_8601": "2024-02-23T17:29:17.507959Z",
            "url": "https://files.pythonhosted.org/packages/85/ff/09458c782c3e0b6d64bc75813a8766b20ac0a0f339b999027cd7b64e036f/stream_localhost-2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-23 17:29:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thevickypedia",
    "github_project": "pystream",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "stream-localhost"
}
        
Elapsed time: 0.22324s