Giter Site home page Giter Site logo

three-play's Introduction

3Play API Helper

Documentation Status Updates

A Python wrapper library for the 3Play API v3

Usage

from three_play.v3 import *
from three_play.v3.models import *

# Assuming you haven't set this via the environment variable
ThreePlayApi.configure('MY-API-KEY')

r = ThreePlayApi.list_media_files(name_partial='Testing')
file_data = r.get('data', [])
files = [MediaFile(**file) for file in file_data]
print(len(files), files)

transcripts = ThreePlayHelper.get_transcripts('my-video-id')
print(len(transcripts), transcripts)

Installing

The 3Play helper library is available on PyPI:

$ python -m pip install three-play

Supported Versions

The three-play helper library officially supports Python 3.7 or higher.

About

I recommend reading the documentation in the source code for important HOW-TO's and info on what each helper function is doing.

I'll need to write some kind of documentation eventually, but that's still pending for now.

At a minimum I recommend setting these 2 environment variables:

  • 3PLAY_API_KEY - API Key to use for requests to 3Play API
  • INTEGRATION_ID - Service Integration ID on 3Play - for example, an integration /w YouTube

Features

  • TODO

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

three-play's People

Contributors

rnag avatar

Stargazers

M∎∎r avatar

Watchers

 avatar  avatar

three-play's Issues

Handle or Address Known Rate Limits

  • 3Play API version: 0.1.1
  • Python version: 3.11
  • Operating System: Mac OS X

Description

I want to update ThreePlayApi model class to add rate limiting (and/or retry and backoff logic) for known APIs.

Per the 3play docs on rate limiting:

  • Most APIs have a rate limit of 500 requests/min.
  • Retrieving transcript text has a (lower) rate limit of 120 requests/min.

Motivation

I have had need to run a batch script to fetch the transcript text of >100 videos (in bulk), and I ran into the specified rate limit error when attempting it earlier.

I want to retry requests on errors (such as rate limits) automatically, so that requests should eventually succeed after 1 minute, and won't result in an immediate failure due to rate limit being exceeded.

Initial Update

The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.

Initial Update

The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.

Make the library strongly-typed

  • 3Play API version: 0.1.1
  • Python version: 3.11
  • Operating System: Mac OS X

Description

I want to update three-play library to be strongly-typed -- similar to my library wystia -- so instead of returning plain dict objects, I want to return dataclasses.

Initial Update

The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.