Skip to content

Commit

Permalink
Support crypto encryption on HTTP
Browse files Browse the repository at this point in the history
Update README.md and runbook
  • Loading branch information
dormant-user committed Jan 31, 2024
1 parent 7533f36 commit 902688a
Show file tree
Hide file tree
Showing 7 changed files with 212 additions and 74 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
**Deployments**

[![book](https://github.com/thevickypedia/pystream/actions/workflows/pages/pages-build-deployment/badge.svg)][gha_pages]
[![pypi](https://github.com/thevickypedia/pystream/actions/workflows/python-publish.yml/badge.svg)][gha_pypi]
[![none-shall-pass](https://github.com/thevickypedia/pystream/actions/workflows/markdown.yml/badge.svg)][gha_none_shall_pass]
[![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)
Expand Down Expand Up @@ -99,8 +99,11 @@ Licensed under the [MIT License][license]
[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/
Expand Down
33 changes: 21 additions & 12 deletions docs/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

<title>Video Streaming &#8212; Stream documentation</title>
<title>PyStream &#8212; Stream documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />

Expand All @@ -18,6 +18,7 @@

<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Authentication" href="authentication.html" />
<link rel="prev" title="Stream-Localhost - A secured interface to stream videos" href="index.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
Expand All @@ -29,11 +30,14 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="authentication.html" title="Authentication"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="Stream-Localhost - A secured interface to stream videos"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">Stream documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Video Streaming</a></li>
<li class="nav-item nav-item-this"><a href="">PyStream</a></li>
</ul>
</div>

Expand All @@ -49,8 +53,8 @@ <h3>Navigation</h3>
<p><a class="reference external" href="https://pypi.org/project/stream-localhost"><img alt="PyPI version shields.io" src="https://img.shields.io/pypi/v/stream-localhost" /></a>
<a class="reference external" href="https://pypi.org/project/stream-localhost/#files"><img alt="Pypi-format" src="https://img.shields.io/pypi/format/stream-localhost" /></a>
<a class="reference external" href="https://pypi.org/project/stream-localhost"><img alt="Pypi-status" src="https://img.shields.io/pypi/status/stream-localhost" /></a></p>
<section id="video-streaming">
<h1>Video Streaming<a class="headerlink" href="#video-streaming" title="Permalink to this heading"></a></h1>
<section id="pystream">
<h1>PyStream<a class="headerlink" href="#pystream" title="Permalink to this heading"></a></h1>
<p>Python module to, stream videos via authenticated sessions using FastAPI</p>
<section id="install">
<h2>Install<a class="headerlink" href="#install" title="Permalink to this heading"></a></h2>
Expand All @@ -66,9 +70,8 @@ <h2>Sample Usage<a class="headerlink" href="#sample-usage" title="Permalink to t

<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">&#39;__main__&#39;</span><span class="p">:</span>
<span class="n">kwargs</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span>
<span class="n">username</span><span class="o">=</span><span class="s2">&quot;foo&quot;</span><span class="p">,</span>
<span class="n">password</span><span class="o">=</span><span class="s2">&quot;bar&quot;</span><span class="p">,</span>
<span class="n">video_source</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">expanduser</span><span class="p">(</span><span class="s1">&#39;~&#39;</span><span class="p">),</span> <span class="s1">&#39;Downloads&#39;</span><span class="p">),</span>
<span class="n">authorization</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;Alan Turing&quot;</span><span class="p">:</span> <span class="s2">&quot;Pr0gRamM1ng&quot;</span><span class="p">,</span> <span class="s2">&quot;Linus Torvalds&quot;</span><span class="p">:</span> <span class="s2">&quot;LinuxOS&quot;</span><span class="p">},</span>
<span class="n">video_source</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">expanduser</span><span class="p">(</span><span class="s1">&#39;~&#39;</span><span class="p">),</span> <span class="s1">&#39;Downloads&#39;</span><span class="p">)</span>
<span class="p">)</span>
<span class="c1"># Add the following to host on local IP address, skip for localhost (127.0.0.1)</span>
<span class="c1"># kwargs[&quot;video_host&quot;] = pystream.utils.get_local_ip()</span>
Expand All @@ -83,9 +86,7 @@ <h3>Env Variables<a class="headerlink" href="#env-variables" title="Permalink to
</div></blockquote>
<p><strong>Mandatory</strong></p>
<ul class="simple">
<li><p><strong>USERNAME</strong>: Any username of choice.</p></li>
<li><p><strong>PASSWORD</strong>: Any password of choice.</p></li>
<li><p><strong>SECRET</strong>: Any private key to encode and decode JWT.</p></li>
<li><p><strong>AUTHORIZATION</strong>: Dictionary of key-value pairs with <code class="docutils literal notranslate"><span class="pre">username</span></code> as key and <code class="docutils literal notranslate"><span class="pre">password</span></code> as value.</p></li>
<li><p><strong>VIDEO_SOURCE</strong>: Source path for video files.</p></li>
</ul>
<blockquote>
Expand Down Expand Up @@ -158,7 +159,7 @@ <h2>License &amp; copyright<a class="headerlink" href="#license-copyright" title
<div>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Video Streaming</a><ul>
<li><a class="reference internal" href="#">PyStream</a><ul>
<li><a class="reference internal" href="#install">Install</a></li>
<li><a class="reference internal" href="#sample-usage">Sample Usage</a><ul>
<li><a class="reference internal" href="#env-variables">Env Variables</a></li>
Expand All @@ -180,6 +181,11 @@ <h4>Previous topic</h4>
<p class="topless"><a href="index.html"
title="previous chapter">Stream-Localhost - A secured interface to stream videos</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="authentication.html"
title="next chapter">Authentication</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
Expand Down Expand Up @@ -210,11 +216,14 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="authentication.html" title="Authentication"
>next</a> |</li>
<li class="right" >
<a href="index.html" title="Stream-Localhost - A secured interface to stream videos"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">Stream documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Video Streaming</a></li>
<li class="nav-item nav-item-this"><a href="">PyStream</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
Expand Down
20 changes: 10 additions & 10 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
**Deployments**

[![book](https://github.com/thevickypedia/pystream/actions/workflows/pages/pages-build-deployment/badge.svg)][gha_pages]
[![pypi](https://github.com/thevickypedia/pystream/actions/workflows/python-publish.yml/badge.svg)][gha_pypi]
[![none-shall-pass](https://github.com/thevickypedia/pystream/actions/workflows/markdown.yml/badge.svg)][gha_none_shall_pass]
[![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]

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

## Install
Expand All @@ -24,9 +24,8 @@ import pystream

if __name__ == '__main__':
kwargs = dict(
username="foo",
password="bar",
video_source=os.path.join(os.path.expanduser('~'), 'Downloads'),
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()
Expand All @@ -38,9 +37,7 @@ if __name__ == '__main__':
> Refer the [wiki page][wiki] for more information.
**Mandatory**
- **USERNAME**: Any username of choice.
- **PASSWORD**: Any password of choice.
- **SECRET**: Any private key to encode and decode JWT.
- **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
Expand Down Expand Up @@ -102,8 +99,11 @@ Licensed under the [MIT License][license]
[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/
Expand Down
20 changes: 10 additions & 10 deletions docs/_sources/README.md.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
**Deployments**

[![book](https://github.com/thevickypedia/pystream/actions/workflows/pages/pages-build-deployment/badge.svg)][gha_pages]
[![pypi](https://github.com/thevickypedia/pystream/actions/workflows/python-publish.yml/badge.svg)][gha_pypi]
[![none-shall-pass](https://github.com/thevickypedia/pystream/actions/workflows/markdown.yml/badge.svg)][gha_none_shall_pass]
[![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]

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

## Install
Expand All @@ -24,9 +24,8 @@ import pystream

if __name__ == '__main__':
kwargs = dict(
username="foo",
password="bar",
video_source=os.path.join(os.path.expanduser('~'), 'Downloads'),
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()
Expand All @@ -38,9 +37,7 @@ if __name__ == '__main__':
> Refer the [wiki page][wiki] for more information.

**Mandatory**
- **USERNAME**: Any username of choice.
- **PASSWORD**: Any password of choice.
- **SECRET**: Any private key to encode and decode JWT.
- **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

Expand Down Expand Up @@ -102,8 +99,11 @@ Licensed under the [MIT License][license]
[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/
Expand Down
Loading

0 comments on commit 902688a

Please sign in to comment.