This project demonstrates how to transfer videos from a Vimeo account to an Amazon S3 bucket.
- Install the necessary libraries using pip:
pip install -r requirements.txt
orpip3 install -r requirements.txt
- In the same directory as the python script, create a file called
.env
, with the following format, and fill in the necessary fields:
AWS_ACCESS_KEY = ''
AWS_SECRET_ACCESS_KEY = ''
BUCKET_NAME = ''
VIMEO_CLIENT_IDENTIFIER = ''
VIMEO_TOKEN = ''
VIMEO_CLIENT_SECRET = ''
OPTIONAL_PATH = ''
AWS_ACCESS_KEY
andAWS_SECRET_ACCESS_KEY
: the public and private keys, respectively, of a user with permissions on the bucket- The required permission is
s3:PutObject
on the bucket (arn:aws:s3:::<bucket-name>/*
)
- The required permission is
BUCKET_NAME
: the name of the bucketVIMEO_CLIENT_IDENTIFIER
:- Go to https://developer.vimeo.com/apps
- Create an App, filling in its name and description
- Copy the value in
Client identifier
to the variable
VIMEO_TOKEN
andVIMEO_CLIENT_SECRET
:- On the same page, under
Authentication
, select the fieldAuthenticated (you)
- Select the
Public
,Private
andVideo Files
scopes - Click on
Generate
- In the
Personal Access Tokens
tab, copy the value inToken
to the variableVIMEO_TOKEN
- In the
Manage App Secrets
tab, copy the value inClient secrets
to the variableVIMEO_CLIENT_SECRET
- On the same page, under
OPTIONAL_PATH
: if you want to transfer the videos to a specific path within the bucket, put the path in this variable WITHOUT the first and last/
- For example: if videos should be stored in
/videos/project/january/
, the value inOPTIONAL_PATH
must bevideos/project/january
- For example: if videos should be stored in
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.