PyLivestream icon indicating copy to clipboard operation
PyLivestream copied to clipboard

How do we start the program?

Open SilverStrings024 opened this issue 4 years ago • 6 comments

Where do I call " ScreenshareLivestream twitch "? Everything I try to run (in the PyLivestream folder its self) says that they're trying to do a relative import with no parents and when I just enter the command into the terminal, it tells me the bash command isn't recognized (I know, I know but I was just taking a stab).

I'm sorry if this is a stupid question but I seriously can't figure this out and there aren't any tutorials or anything about this project. I'd like to use this in a django package I'm making but I need to know how to activate it first lol.

SilverStrings024 avatar Jul 17 '20 02:07 SilverStrings024

These commands come from the "entry_points" in setup.cfg

to enable them, you have to first install this package by either (pick one):

latest development code

git clone https://github.com/scivision/PyLivestream
pip install -e . PyLivestream

latest release

pip install pylivestream

scivision avatar Jul 17 '20 22:07 scivision

Are you looking to have something you can import from another python module? That's not currently present but I think straightforward to add

scivision avatar Jul 17 '20 22:07 scivision

I added a module (in GitHub code, not yet uploaded to PyPi). use it like:

import pylivestream.api as pls

help(pls.stream_screen)
pls.stream_screen('~/twitch.key', 'twitch')

scivision avatar Jul 17 '20 22:07 scivision

I added a module (in GitHub code, not yet uploaded to PyPi). use it like:

import pylivestream.api as pls

help(pls.stream_screen)
pls.stream_screen('~/twitch.key', 'twitch')

Thank you so much! Yeah, I was hoping to get it rigged up to import in a project and add some stuff to it. I was thinking of forking it because I would be adding some extra features but since the package I'm making Is for django, I'm not sure if it would be appropriate to fork it.

However, when I add some stuff (to this project on my machine) and it all works and is well tested, I'll submit a PR. Thanks again for the responses and the module!

SilverStrings024 avatar Jul 18 '20 18:07 SilverStrings024

Hi, I have the same question. Sorry, which file should make the program start? I'm trying to make a Youtube stream, but don't understand how to use this package. By far I've made tests only through the command line. Is there any tutorial or example that I could see? Thanks a lot.

TURBULENTE avatar Jul 18 '20 21:07 TURBULENTE

Hi, I have the same question. Sorry, which file should make the program start? I'm trying to make a Youtube stream, but don't understand how to use this package. By far I've made tests only through the command line. Is there any tutorial or example that I could see? Thanks a lot.

He said that currently you can use the module he put in the github code in your own program. This makes it much easier, just have the import he said at the top, then make a function to use it the way he mentioned and call the function at the bottom of the file so you can run the program and start the stream..

Better explaination: use the import he spoke about in your own python file. Either make a function or simply call the method as he did in his comment that shows how to use it.

Get the code from this github (it's not in pypi yet) then in your file do...

Import pylivestream.api as pls pls.stream_screen('your api key', 'platform to stream to')

Then just run the file and you'll stream your screen to whatever platform you put

@scivision did I explain this correctly?

SilverStrings024 avatar Jul 19 '20 03:07 SilverStrings024