facecast-io-0.5.1
توضیحات
Unofficial API for facecast.io
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | facecast-io-0.5.1 |
| نام | facecast-io |
| نسخه کتابخانه | 0.5.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Serhii Khalymon |
| ایمیل نویسنده | sergiykhalimon@gmail.com |
| آدرس صفحه اصلی | https://github.com/skhalymon/facecast-io |
| آدرس اینترنتی | https://pypi.org/project/facecast-io/ |
| مجوز | MIT |
***********
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
نیازمندی
| مقدار | نام |
|---|---|
| >=0.12.1,<0.13.0 | httpx |
| >=1.4.1,<2.0.0 | pyquery |
| >=0.9.2,<0.10.0 | retry |
| >=3.7,<4.0) | typing |
| >=3.7,<4.0) | typing_extensions |
| >=1.6.1,<2.0.0 | pydantic |
| >=0.3.1,<0.4.0 | typer |
| >=0.4.3,<0.5.0 | colorama |
| >=1.3.2,<2.0.0 | shellingham |
| >=1.1.1,<2.0.0 | email-validator |
| >=0.12.2,<0.13.0 | tld |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7,<4.0 | Python |
نحوه نصب
نصب پکیج whl facecast-io-0.5.1:
pip install facecast-io-0.5.1.whl
نصب پکیج tar.gz facecast-io-0.5.1:
pip install facecast-io-0.5.1.tar.gz