{"id":16135592,"url":"https://github.com/thevickypedia/pystream","last_synced_at":"2025-09-17T09:50:01.586Z","repository":{"id":41055192,"uuid":"507168501","full_name":"thevickypedia/PyStream","owner":"thevickypedia","description":"Video streaming using FastAPI","archived":false,"fork":false,"pushed_at":"2024-06-22T04:24:30.000Z","size":14579,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-25T11:04:30.012Z","etag":null,"topics":["fastapi","fastapi-streaming","httpbasicauth","uvicorn","video-streaming"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thevickypedia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-24T23:30:37.000Z","updated_at":"2024-08-08T12:58:55.000Z","dependencies_parsed_at":"2024-02-23T17:30:04.710Z","dependency_job_id":"a3eb4b13-07bc-4416-99ce-349c1a58bbab","html_url":"https://github.com/thevickypedia/PyStream","commit_stats":{"total_commits":135,"total_committers":3,"mean_commits":45.0,"dds":"0.014814814814814836","last_synced_commit":"c0bbc879bb7aebc5388076ee6ded6dcadc5c84df"},"previous_names":["thevickypedia/pystream"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/thevickypedia/PyStream","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thevickypedia%2FPyStream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thevickypedia%2FPyStream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thevickypedia%2FPyStream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thevickypedia%2FPyStream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thevickypedia","download_url":"https://codeload.github.com/thevickypedia/PyStream/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thevickypedia%2FPyStream/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275572408,"owners_count":25489092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","fastapi-streaming","httpbasicauth","uvicorn","video-streaming"],"created_at":"2024-10-09T23:08:42.203Z","updated_at":"2025-09-17T09:50:01.536Z","avatar_url":"https://github.com/thevickypedia.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"**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\u003e :bulb: \u0026nbsp; Environment variables can _(optionally)_ be loaded from any plain text file.\u003cbr\u003e\n\u003e 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\u003e :bulb: \u0026nbsp; 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\u003e :bulb: \u0026nbsp; If `SECURE_SESSION` to set to `true`, the cookie `session_token` will only be sent via HTTPS\u003cbr\u003e\n\u003e This means that the server can **ONLY** be hosted via `HTTPS` or `localhost`\n\n## Coding Standards\nDocstring format: [`Google`][google-docs] \u003cbr\u003e\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 \u0026 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 \u0026 copyright\n\n\u0026copy; 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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthevickypedia%2Fpystream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthevickypedia%2Fpystream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthevickypedia%2Fpystream/lists"}