Skip to main content

A python wrapper for using the Vimeo API.

Installation

To install python-vimeo, simply:

pip install vimeo

Or

easy_install vimeo

Basic Use

To use python-vimeo, you must first create a Client instance, passing at a minimum of key, secret and callback you obtained when you registered your app:

import vimeo

client = vimeo.Client(key=YOUR_CONSUMER_KEY, secret=YOUR_CONSUMER_SECRET, callback=YOUR_CALLBACK_URL)

The client instance can then be used to fetch or modify resources:

videos = client.get('vimeo.videos.getAll', user_id=11867661, page=1)

Authentication

All OAuth authorization flows supported by the Vimeo API are available in python-vimeo. If you only need read-only access to public resources, go for basic use method as shown above. If however, you need to access private resources or modify a resource, you will need to have a user delegate access to your application. To do this, you can use the following OAuth2 authorization flow.

Authorization Code Flow

The Authorization Code Flow involves redirecting the user to vimeo.com where they will log in and grant access to your application:

import vimeo

client = vimeo.Client(
    key='YOUR_CONSUMER_KEY',
    secret='YOUR_CONSUMER_SECRET',
    callback='YOUR_CALLBACK_URL',
    username='USERNAME_FROM_YOU_APP'
)
redirect(client.authorize_url())

Note that username should be the unique logged in username from your application. The auth informations will be stored in the seperate cache for the specifed username. And callback must match the value you provided when you registered your application. After granting access, the user will be redirected to this url, at which point your application can exchange the returned token information for an access token. After getting the information just pass the token verifier:

token = client.exchange_token('TOKEN_VERIFIER')
access_token = token.key
access_token_secret = token.secret

Examples

Get user’s Authorization:

import vimeo

client = vimeo.Client(key=YOUR_CONSUMER_KEY, secret=YOUR_CONSUMER_SECRET, callback=YOUR_CALLBACK_URL, username='LOGGED IN USERNAME')
redirect(client.authorize_url())

Get the authenticated user’s uploaded videos:

import vimeo

client = vimeo.Client(key=YOUR_CONSUMER_KEY, secret=YOUR_CONSUMER_SECRET, callback=YOUR_CALLBACK_URL, username='LOGGED_IN_USERNAME', token=False)
token = client.exchange_token('TOKEN_VERIFIER_FROM_THE_REDIRECTED_URL')
client = vimeo.Client(key=YOUR_CONSUMER_KEY, secret=YOUR_CONSUMER_SECRET, callback=YOUR_CALLBACK_URL, username='LOGGED_IN_USERNAME', token=True)
videos = client.get('vimeo.videos.getUploaded', page=1)

Release files for vimeo 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vimeo 0.1.9
File Size Uploaded
vimeo-0.1.9.tar.gz 4.3 kB Details

Release files / vimeo-0.1.9.tar.gz

Download URL vimeo-0.1.9.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
462654c22c48387591c25d73232b3b5d3a1183e4c98e60e8d0c34cba0097c4dd
BLAKE2b-256 checksum
How to use checksums
8da6bc32b2f857f24d81d264913a401af98fece533dd0984ffa881e66d96eb8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.9 This release

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page