Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnandersen777/sillystream
stream to connected clients
https://github.com/johnandersen777/sillystream
Last synced: about 16 hours ago
JSON representation
stream to connected clients
- Host: GitHub
- URL: https://github.com/johnandersen777/sillystream
- Owner: johnandersen777
- 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-10-24T09:12:37.069Z (25 days ago)
- Language: Python
- Size: 707 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- 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
```