Installation Guide For Users - panuozzo77/StreamingCommunity GitHub Wiki

via pip

This guide walks you through installing the StreamingCommunity package using pip, and setting up a virtual environment to manage dependencies.

1. Prerequisites

  • Python: Ensure you have Python 3.8 or higher installed. You can check your Python version by running python --version or python3 --version in your terminal.

  • pip: pip should come with your Python installation. You can check if pip is installed by running pip --version in your terminal. If not, you may need to install it separately.

2. Create a Virtual Environment (venv)

Using a virtual environment is highly recommended to isolate project dependencies.

  1. Create the environment:
python3 -m venv .venv

This command creates a new virtual environment in a directory named .venv in your project directory.

  1. Activate the environment:
  • On Linux/macOS:
source .venv/bin/activate
  • On Windows:
.venv\Scripts\activate

Once activated, your terminal prompt will change to show the environment name (e.g., (.venv)).

3. Install StreamingCommunity

  1. Install from PyPI:
pip install StreamingCommunity

This command downloads and installs the latest version of the StreamingCommunity package and its dependencies from the Python Package Index (PyPI).

  1. Upgrade to the latest version (optional):
pip install --upgrade StreamingCommunity

Use this command to update to the newest version of the package.

4. Running StreamingCommunity

  1. Create a Python script:

Create a file named run_streaming.py (or any name you prefer) and add the following code:

from StreamingCommunity.run import main

if __name__ == "__main__":
	main()
  1. Run the script:
python run_streaming.py

5. Deactivate the Virtual Environment (when finished)

When you are done working with the StreamingCommunity project, you can deactivate the virtual environment:

deactivate

This will return your terminal to its normal state.


via docker

This guide explains how to set up and run the StreamingCommunity application using Docker, including building the Docker image and configuring the container.

Prerequisites

  1. Docker: Ensure Docker is installed and running on your system. You can download it from the Docker website.

  2. Make (optional): Install make if you want to use the quick setup commands provided in the Makefile.

You can run the script in a docker container, to build the image just run:

docker build -t streaming-community-api .

and to run it use

docker run -it -p 8000:8000 streaming-community-api

By default the videos will be saved in /app/Video inside the container, if you want to to save them in your machine instead of the container just run

docker run -it -p 8000:8000 -v /path/to/download:/app/Video streaming-community-api

Docker quick setup with Make

Inside the Makefile (install make) are already configured two commands to build and run the container:

make build-container

# set your download directory as ENV variable
make LOCAL_DIR=/path/to/download run-container

The run-container command mounts also the config.json file, so any change to the configuration file is reflected immediately without having to rebuild the image.

⚠️ **GitHub.com Fallback** ⚠️