Giter Site home page Giter Site logo

facecast-io's Introduction

Facecast IO

Unofficial API client to https://facecast.io service

Installation

pip:pip install facecast-io
poetry:poetry add facecast-io

Usage as a library

api = FacecastAPI(os.environ["FACECAST_USERNAME"], os.environ["FACECAST_PASSWORD"])
# display available devices
print(api.devices)

# get device by name
d = api.devices['Dev name']

# delete specific device and all devices
api.devices.delete_device('Dev name')
api.devices.delete_all()

# create device
api.devices.create_device('Dev name')

# display device server url and key
print(d.input_params)

# display outputs of device
print(d.outputs)

# create new output
d.create_output("Youtube", 'rtmp://a.youtube.com', 'youtube-key')

# start/stop output
d.start_outputs()
d.stop_outputs()

# delete all outputs
d.delete_outputs()

Usage in command line mode

First of all you need to login into your Facecast.io account:

$ python -m facecast_io login

Now you're able to work with your devices. Some of useful commands.

Check all existing devices:

$ python -m facecast_io devices list

Create new device

$ python -m facecast_io devices create somename

Show info about specific device

$ python -m facecast_io device someone

Show stream params for device

$ python -m facecast_io device someone --input

Start and stop outputs for device

$ python -m facecast_io device someone --start
$ python -m facecast_io device someone --stop

Provision data from API into Facecast. If we have pipeline that send following structure:

[
  {
    "channel_name": "YT ALLATRA TV Italia",
    "server_url": "url",
    "stream_key": "key",
  },
]

Call command would be next:

$ http GET 'https://streams.com/some' | jq .devname | python -m facecast_io devices provision devname

facecast-io's People

Stargazers

 avatar Illia Ananich avatar

Watchers

James Cloos avatar Serg Khalymon avatar

facecast-io's Issues

Backprotpagation of changes inside Device to Devices

If we want to save availability to delete devices from the device object itself we have to notify about this change parent object. It'll update the internal devices list.

While calling to api.devices.delete_device("Dev name") track all changes but call of api.devices['Dev name'].delete() wont track. At this point we won't have device object in facecast dashboard but it still would be exist inside api.devices.

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.