Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do we start the program? #52

Closed
SilverStrings024 opened this issue Jul 17, 2020 · 6 comments
Closed

How do we start the program? #52

SilverStrings024 opened this issue Jul 17, 2020 · 6 comments

Comments

@SilverStrings024
Copy link

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.

@scivision
Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

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')

@SilverStrings024
Copy link
Author

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!

@TURBULENTE
Copy link

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.

@SilverStrings024
Copy link
Author

SilverStrings024 commented Jul 19, 2020

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?

Repository owner locked and limited conversation to collaborators Dec 1, 2022
@scivision scivision converted this issue into discussion #102 Dec 1, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants