reeln-cli plugin for Cloudflare R2 video uploads
Project description
reeln-plugin-cloudflare
reeln-cli plugin for uploading rendered videos to Cloudflare R2 storage.
Subscribes to POST_RENDER to upload the rendered video file and writes the public CDN URL to context.shared["video_url"] for downstream plugins (e.g. reeln-plugin-meta Instagram Reels publishing).
Installation
uv pip install reeln-plugin-cloudflare
Or install editable for development:
make dev-install
Configuration
| Field | Type | Default | Required | Description |
|---|---|---|---|---|
r2_endpoint |
str | — | yes | Cloudflare R2 S3-compatible endpoint URL |
r2_bucket |
str | — | yes | R2 bucket name |
r2_access_key_env |
str | — | yes | Environment variable name containing the R2 access key ID |
r2_secret_key_env |
str | — | yes | Environment variable name containing the R2 secret access key |
public_url_base |
str | — | yes | Public CDN base URL for uploaded objects |
upload_video |
bool | false |
no | Enable video upload to R2 on POST_RENDER |
upload_prefix |
str | "" |
no | Optional key prefix (folder) for uploaded objects |
upload_max_kbps |
int | 0 |
no | Max upload bandwidth in KB/s (0 = unlimited) |
dry_run |
bool | false |
no | Log upload actions without executing them |
r2_region |
str | "auto" |
no | R2 region (usually 'auto') |
Example
In your reeln-cli config.json, list cloudflare before any plugin that consumes video_url (e.g. meta):
{
"enabled": ["streamn-scoreboard", "openai", "cloudflare", "meta"],
"cloudflare": {
"r2_endpoint": "https://<ACCOUNT_ID>.r2.cloudflarestorage.com",
"r2_bucket": "reeln-videos",
"r2_access_key_env": "R2_ACCESS_KEY_ID",
"r2_secret_key_env": "R2_SECRET_ACCESS_KEY",
"public_url_base": "https://cdn.example.com",
"upload_video": true,
"upload_prefix": "reels"
}
}
Environment Variables
Credentials are resolved indirectly — the config stores the name of the environment variable, not the secret itself:
| Env Var (default name) | Description |
|---|---|
R2_ACCESS_KEY_ID |
Cloudflare R2 access key ID |
R2_SECRET_ACCESS_KEY |
Cloudflare R2 secret access key |
Development
| Command | Description |
|---|---|
make dev-install |
Create venv, install reeln-cli + plugin with dev deps |
make reeln-install |
Install plugin editable into sibling reeln-cli venv |
make test |
Run pytest with 100% line+branch coverage (parallel via xdist) |
make lint |
Run ruff linter |
make format |
Run ruff formatter |
make check |
Lint, mypy strict, then test (sequential) |
License
AGPL-3.0-only
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reeln_plugin_cloudflare-0.3.0.tar.gz.
File metadata
- Download URL: reeln_plugin_cloudflare-0.3.0.tar.gz
- Upload date:
- Size: 57.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aee85a443c664c39d2400623652005189237cbe49a584d606d0c443afc6c6f19
|
|
| MD5 |
53a49218c6ec9298b194d3d3f91d0ab7
|
|
| BLAKE2b-256 |
8c04015b3267967d9096605628491be78706ab9a2f6755481e4cc9d5d6c267aa
|
Provenance
The following attestation bundles were made for reeln_plugin_cloudflare-0.3.0.tar.gz:
Publisher:
release.yml on StreamnDad/reeln-plugin-cloudflare
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reeln_plugin_cloudflare-0.3.0.tar.gz -
Subject digest:
aee85a443c664c39d2400623652005189237cbe49a584d606d0c443afc6c6f19 - Sigstore transparency entry: 1250222937
- Sigstore integration time:
-
Permalink:
StreamnDad/reeln-plugin-cloudflare@15107d62e77e4a3905b502847f563a2dcfee42b8 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/StreamnDad
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@15107d62e77e4a3905b502847f563a2dcfee42b8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file reeln_plugin_cloudflare-0.3.0-py3-none-any.whl.
File metadata
- Download URL: reeln_plugin_cloudflare-0.3.0-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02a405d765994e9392f29dced02d9ebb6f7720bf3f625c0915003df20b86f4ee
|
|
| MD5 |
13051fe9939cf2549f986538aeda62e0
|
|
| BLAKE2b-256 |
fb380ea71116d5c1ac67b5d6ec2534dff8bbb2b2815638b694626170936e2262
|
Provenance
The following attestation bundles were made for reeln_plugin_cloudflare-0.3.0-py3-none-any.whl:
Publisher:
release.yml on StreamnDad/reeln-plugin-cloudflare
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reeln_plugin_cloudflare-0.3.0-py3-none-any.whl -
Subject digest:
02a405d765994e9392f29dced02d9ebb6f7720bf3f625c0915003df20b86f4ee - Sigstore transparency entry: 1250223122
- Sigstore integration time:
-
Permalink:
StreamnDad/reeln-plugin-cloudflare@15107d62e77e4a3905b502847f563a2dcfee42b8 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/StreamnDad
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@15107d62e77e4a3905b502847f563a2dcfee42b8 -
Trigger Event:
push
-
Statement type: