# YouCube Server
[![Python Version: 3.7+]](https://www.python.org/downloads/)
[![Python Lint Workflow Status]](https://github.com/CC-YouCube/server/actions/workflows/pylint.yml)
![preview]
YouCube has a some public servers, which you can use if you don't want to host your own server. \
The client has the public servers set by default, so you can just run the client, and you're good to go. \
Moor Information about the servers can be seen on the [doc].
## Requirements
- [yt-dlp/FFmpeg] / [FFmpeg 5.1+]
- [sanjuuni]
- [Python 3.7+]
- [sanic]
- [yt-dlp]
- [ujson] (Optional)
- [spotipy]
You can install the required packages with [pip] by running:
```shell
pip install -r src/requirements.txt
```
## Starting the Server
```bash
python src/youcube.py
```
## Environment variables
Environment variables you can use to configure the server:
| Variable | Default | Description |
| ----------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------ |
| `HOST` | `127.0.0.1` | The host where the web server runs on. |
| `PORT` | `5000` | The port where the web server should run on |
| `FFMPEG_PATH` | `ffmpeg` | Path to the FFmpeg executable |
| `SANJUUNI_PATH` | `sanjuuni` | Path to the Sanjuuni executable |
| `NO_COLOR` | `False` | Disable colored output |
| `LOGLEVEL` | `DEBUG` | Python Log level of the main logger |
| `DISABLE_OPENCL` | `False` | Disables sanjuuni GPU acceleration |
| `NO_FAST` | `False` | Disable Sanic worker processes maximization |
| `SPOTIPY_CLIENT_ID` | | The Client ID from your [spotify application] |
| `SPOTIPY_CLIENT_SECRET` | | The Client Secret from your [spotify application] |
| `DATA_CACHE_CLEANUP_INTERVAL` | `300` | Time interval (in seconds) for the data cache cleaner to wait before checking for outdated cache entries. |
| `DATA_CACHE_CLEANUP_AFTER` | `3600` | Time threshold (in seconds) for considering a cache entry outdated. Cache entries older than this will be removed. |
And [Sanic Builtin values].
## Docker Compose
```yml
version: "2.0"
services:
youcube:
image: ghcr.io/cc-youcube/youcube:latest
restart: always
hostname: youcube
ports:
- 5000:5000
```
[spotify application]: https://developer.spotify.com/dashboard/applications
[pip]: https://pip.pypa.io/en/stable/installation
[yt-dlp/FFmpeg]: https://github.com/yt-dlp/FFmpeg-Builds
[FFmpeg 5.1+]: https://ffmpeg.org
[sanjuuni]: https://github.com/MCJack123/sanjuuni
[Python 3.7+]: https://www.python.org/downloads
[sanic]: https://sanic.dev
[yt-dlp]: https://pypi.org/project/yt-dlp
[ujson]: https://pypi.org/project/ujson
[spotipy]: https://pypi.org/project/spotipy
[doc]: https://youcube.madefor.cc/api
[preview]: .README/preview-server.png
[Python Version: 3.7+]: https://img.shields.io/badge/Python-3.7+-green?style=for-the-badge&logo=Python&logoColor=white
[Python Lint Workflow Status]: https://img.shields.io/github/actions/workflow/status/CC-YouCube/server/pylint.yml?branch=main&label=Python%20Lint&logo=github&style=for-the-badge
[Sanic Builtin values]: https://sanic.dev/en/guide/running/configuration.md#builtin-values
Raw data
{
"_id": null,
"home_page": null,
"name": "youcube",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "youtube, youcube, computercraft, minecraft",
"author": "Commandcracker",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/8f/72/ec1112185ba92ff408c367adf593e02feea7030b3a1d258183544886663c/youcube-0.0.0.tar.gz",
"platform": null,
"description": "# YouCube Server\r\n\r\n[![Python Version: 3.7+]](https://www.python.org/downloads/)\r\n[![Python Lint Workflow Status]](https://github.com/CC-YouCube/server/actions/workflows/pylint.yml)\r\n\r\n![preview]\r\n\r\nYouCube has a some public servers, which you can use if you don't want to host your own server. \\\r\nThe client has the public servers set by default, so you can just run the client, and you're good to go. \\\r\nMoor Information about the servers can be seen on the [doc].\r\n\r\n## Requirements\r\n\r\n- [yt-dlp/FFmpeg] / [FFmpeg 5.1+]\r\n- [sanjuuni]\r\n- [Python 3.7+]\r\n - [sanic]\r\n - [yt-dlp]\r\n - [ujson] (Optional)\r\n - [spotipy]\r\n\r\nYou can install the required packages with [pip] by running:\r\n\r\n```shell\r\npip install -r src/requirements.txt\r\n```\r\n\r\n## Starting the Server\r\n\r\n```bash\r\npython src/youcube.py\r\n```\r\n\r\n## Environment variables\r\n\r\nEnvironment variables you can use to configure the server:\r\n\r\n| Variable | Default | Description |\r\n| ----------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------ |\r\n| `HOST` | `127.0.0.1` | The host where the web server runs on. |\r\n| `PORT` | `5000` | The port where the web server should run on |\r\n| `FFMPEG_PATH` | `ffmpeg` | Path to the FFmpeg executable |\r\n| `SANJUUNI_PATH` | `sanjuuni` | Path to the Sanjuuni executable |\r\n| `NO_COLOR` | `False` | Disable colored output |\r\n| `LOGLEVEL` | `DEBUG` | Python Log level of the main logger |\r\n| `DISABLE_OPENCL` | `False` | Disables sanjuuni GPU acceleration |\r\n| `NO_FAST` | `False` | Disable Sanic worker processes maximization |\r\n| `SPOTIPY_CLIENT_ID` | | The Client ID from your [spotify application] |\r\n| `SPOTIPY_CLIENT_SECRET` | | The Client Secret from your [spotify application] |\r\n| `DATA_CACHE_CLEANUP_INTERVAL` | `300` | Time interval (in seconds) for the data cache cleaner to wait before checking for outdated cache entries. |\r\n| `DATA_CACHE_CLEANUP_AFTER` | `3600` | Time threshold (in seconds) for considering a cache entry outdated. Cache entries older than this will be removed. |\r\n\r\nAnd [Sanic Builtin values].\r\n\r\n## Docker Compose\r\n\r\n```yml\r\nversion: \"2.0\"\r\nservices:\r\n youcube:\r\n image: ghcr.io/cc-youcube/youcube:latest\r\n restart: always\r\n hostname: youcube\r\n ports:\r\n - 5000:5000\r\n```\r\n\r\n[spotify application]: https://developer.spotify.com/dashboard/applications\r\n[pip]: https://pip.pypa.io/en/stable/installation\r\n[yt-dlp/FFmpeg]: https://github.com/yt-dlp/FFmpeg-Builds\r\n[FFmpeg 5.1+]: https://ffmpeg.org\r\n[sanjuuni]: https://github.com/MCJack123/sanjuuni\r\n[Python 3.7+]: https://www.python.org/downloads\r\n[sanic]: https://sanic.dev\r\n[yt-dlp]: https://pypi.org/project/yt-dlp\r\n[ujson]: https://pypi.org/project/ujson\r\n[spotipy]: https://pypi.org/project/spotipy\r\n[doc]: https://youcube.madefor.cc/api\r\n[preview]: .README/preview-server.png\r\n[Python Version: 3.7+]: https://img.shields.io/badge/Python-3.7+-green?style=for-the-badge&logo=Python&logoColor=white\r\n[Python Lint Workflow Status]: https://img.shields.io/github/actions/workflow/status/CC-YouCube/server/pylint.yml?branch=main&label=Python%20Lint&logo=github&style=for-the-badge\r\n[Sanic Builtin values]: https://sanic.dev/en/guide/running/configuration.md#builtin-values\r\n",
"bugtrack_url": null,
"license": "GPL-3.0",
"summary": "A server which provides a WebSocket API for YouCube clients",
"version": "0.0.0",
"project_urls": {
"Documentation": "https://youcube.madefor.cc/guides/server/installation/",
"Homepage": "https://youcube.madefor.cc",
"Repository": "https://github.com/CC-YouCube/server"
},
"split_keywords": [
"youtube",
" youcube",
" computercraft",
" minecraft"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a459979a4cff0c5e20a8649a23d751e446289246abd11bb906ef958eb6de71fe",
"md5": "6f9631cafe6555e88b9fce83cc1a692b",
"sha256": "9754b325462df67f17c7657bb5899a3e84c70b2876630c73ba7d7098dc774544"
},
"downloads": -1,
"filename": "youcube-0.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6f9631cafe6555e88b9fce83cc1a692b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 29818,
"upload_time": "2024-05-12T09:37:29",
"upload_time_iso_8601": "2024-05-12T09:37:29.508564Z",
"url": "https://files.pythonhosted.org/packages/a4/59/979a4cff0c5e20a8649a23d751e446289246abd11bb906ef958eb6de71fe/youcube-0.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8f72ec1112185ba92ff408c367adf593e02feea7030b3a1d258183544886663c",
"md5": "ea59868873798da1e68a0ba46ac92024",
"sha256": "defb2f2777c30fe9187cd96f6ee000462c996adf57033a170f856c820c425c14"
},
"downloads": -1,
"filename": "youcube-0.0.0.tar.gz",
"has_sig": false,
"md5_digest": "ea59868873798da1e68a0ba46ac92024",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 392756,
"upload_time": "2024-05-12T09:37:31",
"upload_time_iso_8601": "2024-05-12T09:37:31.702491Z",
"url": "https://files.pythonhosted.org/packages/8f/72/ec1112185ba92ff408c367adf593e02feea7030b3a1d258183544886663c/youcube-0.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-12 09:37:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "CC-YouCube",
"github_project": "server",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "youcube"
}