Skip to content

Commit

Permalink
Change env var website to websites
Browse files Browse the repository at this point in the history
Update README.md and runbook
  • Loading branch information
dormant-user committed Feb 19, 2024
1 parent a8aa05a commit 75bf3d8
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 150 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ if __name__ == '__main__':
- **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`
- **WEBSITE**: List of websites (_supports regex_) to add to CORS configuration. _Required only if tunneled via CDN_
- **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`
- **SECURE_SESSION**: Boolean flag to secure the cookie `session_token` to restrict serving **_ONLY_** via **HTTPS**.
Defaults to `False`
- **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`
> :bulb:   `KEY_FILE` and `CERT_FILE` becomes mandatory when `VIDEO_PORT` is set to `443`
- **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>
Expand Down
7 changes: 0 additions & 7 deletions doc_gen/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,6 @@ Basics
:members:
:undoc-members:

Secure
======

.. automodule:: pystream.routers.secure
:members:
:undoc-members:

Video
=====

Expand Down
6 changes: 4 additions & 2 deletions docs/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,15 @@ <h3>Env Variables<a class="headerlink" href="#env-variables" title="Permalink to
<li><p><strong>VIDEO_PORT</strong>: Port number to host the application. Defaults to <code class="docutils literal notranslate"><span class="pre">8000</span></code></p></li>
<li><p><strong>FILE_FORMATS</strong>: Sequence of supported video file formats. Defaults to <code class="docutils literal notranslate"><span class="pre">(.mp4,</span> <span class="pre">.mov)</span></code></p></li>
<li><p><strong>WORKERS</strong>: Number of workers to spin up the <code class="docutils literal notranslate"><span class="pre">uvicorn</span></code> server. Defaults to <code class="docutils literal notranslate"><span class="pre">1</span></code></p></li>
<li><p><strong>WEBSITE</strong>: List of websites (<em>supports regex</em>) to add to CORS configuration. <em>Required only if tunneled via CDN</em></p></li>
<li><p><strong>WEBSITES</strong>: List of websites (<em>supports regex</em>) to add to CORS configuration. <em>Required only if tunneled via CDN</em></p></li>
<li><p><strong>AUTO_THUMBNAIL</strong>: Boolean flag to auto generate thumbnail images for preview. Defaults to <code class="docutils literal notranslate"><span class="pre">True</span></code></p></li>
<li><p><strong>KEY_FILE</strong>: Path to the private key file for SSL certificate. Defaults to <code class="docutils literal notranslate"><span class="pre">None</span></code></p></li>
<li><p><strong>CERT_FILE</strong>: Path to the full chain file for SSL certificate. Defaults to <code class="docutils literal notranslate"><span class="pre">None</span></code></p></li>
<li><p><strong>SECURE_SESSION</strong>: Boolean flag to secure the cookie <code class="docutils literal notranslate"><span class="pre">session_token</span></code>. Defaults to <code class="docutils literal notranslate"><span class="pre">False</span></code></p></li>
</ul>
<blockquote>
<div><p>:bulb:   <code class="docutils literal notranslate"><span class="pre">KEY_FILE</span></code> and <code class="docutils literal notranslate"><span class="pre">CERT_FILE</span></code> becomes mandatory when <code class="docutils literal notranslate"><span class="pre">VIDEO_PORT</span></code> is set to <code class="docutils literal notranslate"><span class="pre">443</span></code></p>
<div><p>:bulb:   If <code class="docutils literal notranslate"><span class="pre">SECURE_SESSION</span></code> to set to <code class="docutils literal notranslate"><span class="pre">true</span></code>, the cookie <code class="docutils literal notranslate"><span class="pre">session_token</span></code> will only be sent via HTTPS<br>
This means that the server can <strong>ONLY</strong> be hosted via <code class="docutils literal notranslate"><span class="pre">HTTPS</span></code> or <code class="docutils literal notranslate"><span class="pre">localhost</span></code></p>
</div></blockquote>
</section>
</section>
Expand Down
6 changes: 4 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ if __name__ == '__main__':
- **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`
- **WEBSITE**: List of websites (_supports regex_) to add to CORS configuration. _Required only if tunneled via CDN_
- **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`
> :bulb: &nbsp; `KEY_FILE` and `CERT_FILE` becomes mandatory when `VIDEO_PORT` is set to `443`
- **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>
Expand Down
6 changes: 4 additions & 2 deletions docs/_sources/README.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ if __name__ == '__main__':
- **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`
- **WEBSITE**: List of websites (_supports regex_) to add to CORS configuration. _Required only if tunneled via CDN_
- **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`
> :bulb: &nbsp; `KEY_FILE` and `CERT_FILE` becomes mandatory when `VIDEO_PORT` is set to `443`
- **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>
Expand Down
14 changes: 0 additions & 14 deletions docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ Images
:members:
:undoc-members:

Secure
======

.. automodule:: pystream.models.secure
:members:
:undoc-members:

Squire
======

Expand Down Expand Up @@ -86,13 +79,6 @@ Basics
:members:
:undoc-members:

Secure
======

.. automodule:: pystream.routers.secure
:members:
:undoc-members:

Video
=====

Expand Down
49 changes: 6 additions & 43 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ <h1 id="index">Index</h1>

<div class="genindex-jumpbox">
<a href="#A"><strong>A</strong></a>
| <a href="#B"><strong>B</strong></a>
| <a href="#C"><strong>C</strong></a>
| <a href="#D"><strong>D</strong></a>
| <a href="#E"><strong>E</strong></a>
Expand Down Expand Up @@ -80,23 +79,9 @@ <h2 id="A">A</h2>
</ul></td>
</tr></table>

<h2 id="B">B</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#pystream.models.secure.base64_decode">base64_decode() (in module pystream.models.secure)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#pystream.models.secure.base64_encode">base64_encode() (in module pystream.models.secure)</a>
</li>
</ul></td>
</tr></table>

<h2 id="C">C</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#pystream.models.secure.calculate_hash">calculate_hash() (in module pystream.models.secure)</a>
</li>
<li><a href="index.html#pystream.models.config.EnvConfig.cert_file">cert_file (pystream.models.config.EnvConfig attribute)</a>
</li>
</ul></td>
Expand Down Expand Up @@ -189,19 +174,13 @@ <h2 id="G">G</h2>
<h2 id="H">H</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#pystream.models.secure.hex_decode">hex_decode() (in module pystream.models.secure)</a>
</li>
<li><a href="index.html#pystream.models.secure.hex_encode">hex_encode() (in module pystream.models.secure)</a>
</li>
<li><a href="index.html#pystream.models.config.EnvConfig.Config.hide_input_in_errors">hide_input_in_errors (pystream.models.config.EnvConfig.Config attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#pystream.models.config.Static.home_endpoint">home_endpoint (pystream.models.config.Static attribute)</a>
</li>
<li><a href="index.html#pystream.routers.auth.home_page">home_page() (in module pystream.routers.auth)</a>
</li>
<li><a href="index.html#pystream.routers.secure.https_redirect">https_redirect() (in module pystream.routers.secure)</a>
</li>
</ul></td>
</tr></table>
Expand Down Expand Up @@ -274,8 +253,6 @@ <h2 id="M">M</h2>
<li><a href="index.html#module-pystream.models.config">pystream.models.config</a>
</li>
<li><a href="index.html#module-pystream.models.images">pystream.models.images</a>
</li>
<li><a href="index.html#module-pystream.models.secure">pystream.models.secure</a>
</li>
<li><a href="index.html#module-pystream.models.squire">pystream.models.squire</a>
</li>
Expand All @@ -286,8 +263,6 @@ <h2 id="M">M</h2>
<li><a href="index.html#module-pystream.routers.auth">pystream.routers.auth</a>
</li>
<li><a href="index.html#module-pystream.routers.basics">pystream.routers.basics</a>
</li>
<li><a href="index.html#module-pystream.routers.secure">pystream.routers.secure</a>
</li>
<li><a href="index.html#module-pystream.routers.video">pystream.routers.video</a>
</li>
Expand All @@ -312,7 +287,7 @@ <h2 id="P">P</h2>
</li>
<li><a href="index.html#pystream.models.config.EnvConfig.parse_video_host">parse_video_host() (pystream.models.config.EnvConfig class method)</a>
</li>
<li><a href="index.html#pystream.models.config.EnvConfig.parse_website">parse_website() (pystream.models.config.EnvConfig class method)</a>
<li><a href="index.html#pystream.models.config.EnvConfig.parse_websites">parse_websites() (pystream.models.config.EnvConfig class method)</a>
</li>
<li><a href="index.html#pystream.models.config.Static.preview">preview (pystream.models.config.Static attribute)</a>
</li>
Expand Down Expand Up @@ -351,13 +326,6 @@ <h2 id="P">P</h2>

<ul>
<li><a href="index.html#module-pystream.models.images">module</a>
</li>
</ul></li>
<li>
pystream.models.secure

<ul>
<li><a href="index.html#module-pystream.models.secure">module</a>
</li>
</ul></li>
</ul></td>
Expand Down Expand Up @@ -395,13 +363,6 @@ <h2 id="P">P</h2>

<ul>
<li><a href="index.html#module-pystream.routers.basics">module</a>
</li>
</ul></li>
<li>
pystream.routers.secure

<ul>
<li><a href="index.html#module-pystream.routers.secure">module</a>
</li>
</ul></li>
<li>
Expand Down Expand Up @@ -454,6 +415,8 @@ <h2 id="R">R</h2>
<h2 id="S">S</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#pystream.models.config.EnvConfig.secure_session">secure_session (pystream.models.config.EnvConfig attribute)</a>
</li>
<li><a href="index.html#pystream.models.stream.send_bytes_range_requests">send_bytes_range_requests() (in module pystream.models.stream)</a>
</li>
<li><a href="index.html#pystream.models.config.Session">Session (class in pystream.models.config)</a>
Expand All @@ -463,11 +426,11 @@ <h2 id="S">S</h2>
<li><a href="index.html#pystream.main.shutdown_tasks">shutdown_tasks() (in module pystream.main)</a>
</li>
<li><a href="index.html#pystream.models.subtitles.srt_to_vtt">srt_to_vtt() (in module pystream.models.subtitles)</a>
</li>
<li><a href="index.html#pystream.main.start">start() (in module pystream.main)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#pystream.main.start">start() (in module pystream.main)</a>
</li>
<li><a href="index.html#pystream.main.startup_tasks">startup_tasks() (in module pystream.main)</a>
</li>
<li><a href="index.html#pystream.models.config.Static">Static (class in pystream.models.config)</a>
Expand Down Expand Up @@ -532,7 +495,7 @@ <h2 id="V">V</h2>
<h2 id="W">W</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#pystream.models.config.EnvConfig.website">website (pystream.models.config.EnvConfig attribute)</a>
<li><a href="index.html#pystream.models.config.EnvConfig.websites">websites (pystream.models.config.EnvConfig attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
Expand Down
Loading

0 comments on commit 75bf3d8

Please sign in to comment.