Unofficial API for facecast.io
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file facecast_io-0.5.1.tar.gz.
File metadata
- Download URL: facecast_io-0.5.1.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.2 CPython/3.8.2 Darwin/19.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bec986f1a7a0167c8a85d01cf340f3b16dbf46b9e9ce59dc6fc29ad797c48af5
|
|
| MD5 |
79659b9bb6d390103a5b63300a1b65c3
|
|
| BLAKE2b-256 |
a6a97997a23d4a945aa0ac89d40ac44ca71b7ad7d409670ee977560bdad5a7d2
|
File details
Details for the file facecast_io-0.5.1-py3-none-any.whl.
File metadata
- Download URL: facecast_io-0.5.1-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.2 CPython/3.8.2 Darwin/19.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1d0283e074910349510b047f3cd336e4ef890e8cfa5dd1079164f198b8ff6dc
|
|
| MD5 |
202518ab1403d406ee389fbaad6d2af7
|
|
| BLAKE2b-256 |
aae6a1321a00ac218c0137b43620c446c2a75268286e608eda84670020ec4304
|