Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pdxjohnny/sillystream
stream to connected clients
https://github.com/pdxjohnny/sillystream
Last synced: about 1 month ago
JSON representation
stream to connected clients
- Host: GitHub
- URL: https://github.com/pdxjohnny/sillystream
- Owner: pdxjohnny
- License: mit
- Created: 2015-07-24T09:00:09.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-07-24T20:53:20.000Z (over 9 years ago)
- Last Synced: 2024-09-18T10:19:28.626Z (about 2 months ago)
- Language: Python
- Size: 707 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
sillystream
---sillystream sends anything passed to sillystream.server.write to all clients
connected to the sillystream.server.
It is especially useful for daemon processes.Docker building and pushing using sillystream to see output
of remote daemon [blog post](http://pdxjohnny.github.io/2015/07/24/gitlab-automated-docker-builds.html)![sillystream-docker](https://raw.githubusercontent.com/pdxjohnny/sillystream/master/examples/docker.gif)
Using sillystream in python, more in examples folder
```python
import sys
import time
import sillystream# Number to print to
GO_TO = 50# Create sillystream server
output = sillystream.server()
# Start the server
output.start_thread()
# Set stdout and stderr to sillystream server
sys.stdout = output
sys.stderr = output# Print numbers
for num in range(0, GO_TO):
print(num)
time.sleep(0.5)
```Then in another shell to see the output
```bash
python -m sillystream client
```