LesPrimus / vimex

A wrapper around Httpx for the Vimeo api.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VIMEX

A simple wrapper around Httpx for interact with the Vimeo api.

The first step to make a request to the vimeo api is to authenticate the request.

Client Credentials authentication.

  • Sync version.
import vimex

auth = vimex.VimeoOAuth2ClientCredentials(
    client_id="my_client_id",
    client_secret="my_client_secret"
)

with vimex.VimeoClient(auth=auth) as client:
    res = client.get("https://api.vimeo.com")

Authorization code authentication.

  • Sync version.
import vimex

auth = vimex.VimeoOauth2AuthorizationCode(
    client_id="my_client_id",
    client_secret="my_client_secret",
    state="some_state"
)

with vimex.VimeoClient(auth=auth) as client:
    res = client.get("https://api.vimeo.com/me")

alt text

todo:

  • Add a cache for the tokens.

About

A wrapper around Httpx for the Vimeo api.


Languages

Language:Python 100.0%