Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
For an outline of past/future changes refer to: CHANGELOG
A Streamlabs Socket API key.
Settings->Api Settings->API Tokens
Python 3.8 or greater
pip install streamlabsio
You may store your api key in a config.toml
file, its contents should resemble:
[streamlabs]
token = "<apikey>"
Place it next to your __main__.py
file.
You may pass it as a keyword argument.
Example __main__.py
:
import streamlabsio
def on_twitch_event(event, data):
print(f"{event}: {data.attrs()}")
def main():
with streamlabsio.connect(token="<apikey>") as client:
client.obs.on("streamlabs", on_twitch_event)
client.obs.on("twitch_account", on_twitch_event)
# run for 30 seconds then disconnect client from server
client.sio.sleep(30)
if __name__ == "__main__":
main()
From the SocketIO docs, client.sio.wait()
may be used if your application has nothing to do in the main thread.
streamlabsio.connect(token="<apikey>", raw=False)
The following keyword arguments may be passed:
token
: str Streamlabs SocketIO api token.raw
: boolean=False Receive raw data messages as json objects.The following attribute is available:
raw
: boolean Toggle raw mode at runtime.For event data you may inspect the available attributes using attrs()
.
example:
def on_twitch_event(event, data):
print(f"{event}: {data.attrs()}")
SteamlabsSIOError
: Base StreamlabsSIO error classSteamlabsSIOConnectionError
: Exception raised when connection errors occurTo view raw incoming event data set logging level to DEBUG. Check debug
example.
FAQs
Get real time Twitch/Youtube events through Streamlabs SocketIO API
We found that streamlabsio demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.