Skip to main content

SPAW is an Unofficial Streamable API Wrapper for Python

Project description

Streamable API Wrapper (SPAW)

SPAW is an Unoffical Streamable API wrapper for Python.

Streamable API Documentation

https://streamable.com/documentation

Requirments

Python 3.5+

The following modules are also used:

requests
json

Usage

Install through pip

pip3 install SPAW

To initialize an instance:

import spaw  

spaw.SPAW() 

Authentication

Streamable uses Basic Auth for their API.
As such the Streamable API requires Authentication to Upload/Import a video or to Retrieve a video in raw mp4 embed format.
Only Retrieving a video in oEmbed format is allowed without Authentication.

To authenticate:

SPAW.auth(email, password)

Where the arguments are the email and password of your Streamable account.

Import a Video

Takes in given URL of a video and imports/uploads it onto Streamable.

SPAW.importVideo(url)

Returns JSON with Shortcode and Status

{'status': 1, 'shortcode': 'code'}

The link to the video will be https://streamable.com/code

Upload a Video

Takes in given filename for a video and uploads it onto Streamable.

SPAW.uploadVideo(filename)

Returns JSON with Shortcode and Status just like importVideo()

Retrieve a Video

Retrieves a Streamable video as embed code given the shortcode of video URL.
The embed video can be retrieved as oEmbed or a raw mp4. by default set to 'raw'.

SPAW.retrieve(shortcode,format)

Returns JSON for the embed code for the video.
for e.g.
SPAW.retrieve('moo', 'oEmbed')
Returns

{"provider_url": "https://streamable.com", "html": "<iframe class=\"streamable-embed\" src=\"https://streamable.com/o/moo\" frameborder=\"0\" scrolling=\"no\" width=\"852\" height=\"480\" allowfullscreen></iframe>", "version": "1.0", "title": "\"Please don't eat me!\"", "type": "video", "provider_name": "Streamable", "thumbnail_url": "//images.streamable.com/west/image/f6441ae0c84311e4af010bc47400a0a4.jpg?height=100", "width": 852, "height": 480}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spaw-0.1.6.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

spaw-0.1.6-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file spaw-0.1.6.tar.gz.

File metadata

  • Download URL: spaw-0.1.6.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for spaw-0.1.6.tar.gz
Algorithm Hash digest
SHA256 9a26cc3fef23adad81ab5d7d5bac72f82ff88a9524175fc59e7928b5fb7743ad
MD5 bca403f48750b40c370f1aca324a8fec
BLAKE2b-256 f4c58737132024b35c19c7c1bd76074bb783ab39c24214dbd202a7669c171b90

See more details on using hashes here.

File details

Details for the file spaw-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for spaw-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9b1bcfc040bd323258f9c4555bde12d9271980c35b76923294dfcbcd8880685d
MD5 af02867c25407215122a3f48eeb390bd
BLAKE2b-256 fe3e54785db28fd3c1685e942d0be0e731df6fff9176803392c20165a5efaa5d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page