Name | gumd JSON |
Version |
0.0.21
JSON |
| download |
home_page | https://github.com/futzu/gumd |
Summary | gumd, Grande Unified Multicast Daemon |
upload_time | 2023-03-15 00:36:37 |
maintainer | |
docs_url | None |
author | Adrian |
requires_python | >=3.6 |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<I> "I've been googling for some time now, and still have yet to find a working example of Python multicast"</I>
# Behold gumd.
---
## `G`<I>rande</I> `U`<I>nicast</I> `M` <I>ulticast</I> `D` <I>aemon</I>
---
### Latest is `v.0.0.17`
![image](https://user-images.githubusercontent.com/52701496/223828007-7d5e0bbc-7a21-400a-8ea8-5eff9620bc5a.png)
* __Install__
```smalltalk
python3 -mpip install gumd
```
### Use gumd (Daemon) programmatically
```py3
>>>> from gumd import GumD
>>>> gumd =GumD('235.35.3.5:3535',ttl=1)
>>>> gumd.send_stream("/home/a/stuff")
stream uri: udp://@235.35.3.5:3535
>>>>
```
### Use gumc (Client) programmatically
```py3
>>>> from gumc import GumC
>>>> gumc = GumC("udp://@235.35.3.5:3535")
>>>> data = gumc.read(8)
>>>> data
b'Helloooo'
```
## Cli tools
* The cli tools __gumd and gumc__ try to install to ~/.local/bin
* make sure ~/.local/bin is in your path I have this at the end my .bashrc
```sh
PLAN9=/home/a/plan9port export PLAN9
PATH=/home/a/.local/bin:$PLAN9:$PATH export PATH
```
if you dont get them installed, roll your own.
* __gumd__ _(Daemon)_
```lua
#!/usr/bin/env python3
from gumd import cli
cli()
```
* __gumc__ _(Client)_
```lua
#!/usr/bin/env python3
from gumc import cli
cli()
```
#### Install cli tools
```
install gumd /usr/local/bin # or ~/.local/bin
install gumc /usr/local/bin # or ~/.local/bin
```
#### __Use gumd (Daemon) cli__
* Supported input mpegts URIs:
* files `gumd -i /home/me/vid.ts`
* http(s) `gumd -i https://futzu.com/xaa.ts`
* udp `gumd -i udp://127.0.0.1:4000`
* multicast `gumd -i udp://@235.1.2.3:4567`
* reading from stdin `cat myvideo.ts | gumd`
```smalltalk
usage: gumd [-h] [-i INPUT] [-a ADDR] [-u] [-b BIND_ADDR] [-t TTL] [-v]
optional arguments:
-h, --help show this help message and exit
-i INPUT, --input INPUT
like "/home/a/vid.ts" or "udp://@235.35.3.5:3535" or "https://futzu.com/xaa.ts"
-a ADDR, --addr ADDR Destination Address:Port like "227.1.3.10:4310"
-u, --unicast Use Unicast instead of Multicast
-b BIND_ADDR, --bind_addr BIND_ADDR
Local IP and Port to bind to like "192.168.1.34:5555". Default is "0.0.0.0:1025"
-t TTL, --ttl TTL Multicast TTL 1 - 255
-v, --version Show version
```
#### __start gumd (Daemon) cli__
```smalltalk
a@debian:~/gumd$ gumd -i /home/a/abc.py
stream uri: udp://@235.35.3.5:3535
a@debian:~/gumd$
```
#### __use gumc (Client) cli__
```lua
usage: gumc [-h] [-i INSTUFF] [-b BYTESIZE] [-v]
options:
-h, --help show this help message and exit
-i INSTUFF, --instuff INSTUFF
default is 'udp://@235.35.3.5:3535'
-b BYTESIZE, --bytesize BYTESIZE
Number of bytes to read. default is 1
-v, --version Show version
```
### start gumc (Client) cli
```lua
a@debian:~/build/clean/gumd$ gumc -i udp://@235.35.3.5:3535 -b 1024
```
### Test gumd and gumc together
* first terminal, start the client, __gumc__
```lua
a@debian:~/build/clean/gumd$ pypy3 gumc.py -b 5 -i udp://@235.35.3.5:3535
```
* second terminal,start the daemon, gumd__ and send a "hello"
```lua
a@debian:~/build/clean/gumd$ printf 'hello' | gumd -a 235.35.3.5:3535
stream uri: udp://@235.35.3.5:3535
```
### play gumd (Daemon) stream with ffplay
```smalltalk
ffplay udp://@235.35.3.5:3535
```
### segment stream from gumd (Daemon) into hls with [x9k3](https://github.com/futzu/x9k3)
```smalltalk
pypy3 x9k3.py -i udp://@235.35.3.5:3535
```
### read 13 bytes from a multicast stream with gumc (Client)
```lua
gumc -i udp://@235.35.3.5:3535 -b 13
```
### read 10000 bytes from a multicast stream with gumc (Client)
```lua
gumc -i udp://@235.35.3.5:3535 -b 10000
```
#### Note: a multicast client works a little differently than most people expect.
#### You must specify a size to read or the client will never return.
___
<details> <summary><h2> .</h2> </summary>
Phase One: Expose the Pep Deep State
</h2> </summary>
* [Phase One has begun](https://github.com/python/peps/compare/main...futzu:peps:main)
</details>
___
![image](https://user-images.githubusercontent.com/52701496/166299701-72ee908a-5053-45fc-a716-4b8ca4b1ef32.png)
Raw data
{
"_id": null,
"home_page": "https://github.com/futzu/gumd",
"name": "gumd",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "Adrian",
"author_email": "spam@iodisco.com",
"download_url": "https://files.pythonhosted.org/packages/df/1e/81907f80da8c6463c02abae9f05394be9a7bbad269e15892740d2ed7026b/gumd-0.0.21.tar.gz",
"platform": "all",
"description": "<I> \"I've been googling for some time now, and still have yet to find a working example of Python multicast\"</I>\n\n# Behold gumd.\n\n---\n## `G`<I>rande</I> `U`<I>nicast</I> `M` <I>ulticast</I> `D` <I>aemon</I> \n\n\n---\n\n### Latest is `v.0.0.17`\n\n![image](https://user-images.githubusercontent.com/52701496/223828007-7d5e0bbc-7a21-400a-8ea8-5eff9620bc5a.png)\n\n\n* __Install__\n\n```smalltalk\n\npython3 -mpip install gumd\n\n```\n\n### Use gumd (Daemon) programmatically\n```py3\n>>>> from gumd import GumD\n>>>> gumd =GumD('235.35.3.5:3535',ttl=1)\n>>>> gumd.send_stream(\"/home/a/stuff\")\nstream uri: udp://@235.35.3.5:3535\n>>>>\n```\n### Use gumc (Client) programmatically\n```py3\n>>>> from gumc import GumC\n>>>> gumc = GumC(\"udp://@235.35.3.5:3535\")\n>>>> data = gumc.read(8)\n>>>> data\nb'Helloooo'\n\n```\n## Cli tools\n* The cli tools __gumd and gumc__ try to install to ~/.local/bin\n* make sure ~/.local/bin is in your path I have this at the end my .bashrc \n```sh\nPLAN9=/home/a/plan9port export PLAN9\nPATH=/home/a/.local/bin:$PLAN9:$PATH export PATH\n```\n if you dont get them installed, roll your own.\n \n* __gumd__ _(Daemon)_\n\n ```lua\n\n #!/usr/bin/env python3\n\n from gumd import cli \n\n cli()\n```\n\n* __gumc__ _(Client)_\n\n```lua\n #!/usr/bin/env python3\n\n from gumc import cli \n\n cli()\n\n\n```\n#### Install cli tools\n```\n\ninstall gumd /usr/local/bin # or ~/.local/bin\ninstall gumc /usr/local/bin # or ~/.local/bin\n\n\n```\n#### __Use gumd (Daemon) cli__\n\n * Supported input mpegts URIs:\n \n \n * files `gumd -i /home/me/vid.ts`\n \n * http(s) `gumd -i https://futzu.com/xaa.ts`\n \n * udp `gumd -i udp://127.0.0.1:4000`\n\n * multicast `gumd -i udp://@235.1.2.3:4567`\n \n * reading from stdin `cat myvideo.ts | gumd`\n\n```smalltalk\nusage: gumd [-h] [-i INPUT] [-a ADDR] [-u] [-b BIND_ADDR] [-t TTL] [-v]\n\noptional arguments:\n -h, --help show this help message and exit\n -i INPUT, --input INPUT\n like \"/home/a/vid.ts\" or \"udp://@235.35.3.5:3535\" or \"https://futzu.com/xaa.ts\"\n -a ADDR, --addr ADDR Destination Address:Port like \"227.1.3.10:4310\"\n -u, --unicast Use Unicast instead of Multicast\n -b BIND_ADDR, --bind_addr BIND_ADDR\n Local IP and Port to bind to like \"192.168.1.34:5555\". Default is \"0.0.0.0:1025\"\n -t TTL, --ttl TTL Multicast TTL 1 - 255\n -v, --version Show version\n\n```\n#### __start gumd (Daemon) cli__\n```smalltalk\na@debian:~/gumd$ gumd -i /home/a/abc.py \nstream uri: udp://@235.35.3.5:3535\na@debian:~/gumd$ \n```\n#### __use gumc (Client) cli__\n```lua\nusage: gumc [-h] [-i INSTUFF] [-b BYTESIZE] [-v]\n\noptions:\n -h, --help show this help message and exit\n -i INSTUFF, --instuff INSTUFF\n default is 'udp://@235.35.3.5:3535'\n -b BYTESIZE, --bytesize BYTESIZE\n Number of bytes to read. default is 1\n -v, --version Show version\n```\n\n### start gumc (Client) cli\n```lua\na@debian:~/build/clean/gumd$ gumc -i udp://@235.35.3.5:3535 -b 1024\n\n```\n### Test gumd and gumc together\n* first terminal, start the client, __gumc__\n```lua\na@debian:~/build/clean/gumd$ pypy3 gumc.py -b 5 -i udp://@235.35.3.5:3535\n```\n* second terminal,start the daemon, gumd__ and send a \"hello\"\n```lua\na@debian:~/build/clean/gumd$ printf 'hello' | gumd -a 235.35.3.5:3535\nstream uri: udp://@235.35.3.5:3535\n```\n### play gumd (Daemon) stream with ffplay\n\n```smalltalk\nffplay udp://@235.35.3.5:3535\n```\n### segment stream from gumd (Daemon) into hls with [x9k3](https://github.com/futzu/x9k3)\n\n```smalltalk\npypy3 x9k3.py -i udp://@235.35.3.5:3535\n```\n \n### read 13 bytes from a multicast stream with gumc (Client)\n ```lua\n gumc -i udp://@235.35.3.5:3535 -b 13\n ```\n### read 10000 bytes from a multicast stream with gumc (Client)\n ```lua\n gumc -i udp://@235.35.3.5:3535 -b 10000\n```\n#### Note: a multicast client works a little differently than most people expect.\n#### You must specify a size to read or the client will never return.\n___\n\n\n<details> <summary><h2> .</h2> </summary>\n\n Phase One: Expose the Pep Deep State\n</h2> </summary>\n * [Phase One has begun](https://github.com/python/peps/compare/main...futzu:peps:main)\n \n</details>\n\n\n___\n\n![image](https://user-images.githubusercontent.com/52701496/166299701-72ee908a-5053-45fc-a716-4b8ca4b1ef32.png)\n",
"bugtrack_url": null,
"license": "",
"summary": "gumd, Grande Unified Multicast Daemon",
"version": "0.0.21",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8399f8fd8ad59a49ef27aa25324f7f318309efe3a3f2784eb684aa3bd56b37a7",
"md5": "19aa1e5f40dfb84266029fad30f119e7",
"sha256": "a01db0a1fc3a2e1a2f6107ca47d5338fe1b0b406dadbc13d14fac6450239c88f"
},
"downloads": -1,
"filename": "gumd-0.0.21-py3-none-any.whl",
"has_sig": false,
"md5_digest": "19aa1e5f40dfb84266029fad30f119e7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 5930,
"upload_time": "2023-03-15T00:36:34",
"upload_time_iso_8601": "2023-03-15T00:36:34.381947Z",
"url": "https://files.pythonhosted.org/packages/83/99/f8fd8ad59a49ef27aa25324f7f318309efe3a3f2784eb684aa3bd56b37a7/gumd-0.0.21-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "df1e81907f80da8c6463c02abae9f05394be9a7bbad269e15892740d2ed7026b",
"md5": "a6d25928a73ee07378e14dd92ce4da23",
"sha256": "f365faa712f88a28140a9454822f5630f47dd954f9e257b1521c62a9e9fe24a2"
},
"downloads": -1,
"filename": "gumd-0.0.21.tar.gz",
"has_sig": false,
"md5_digest": "a6d25928a73ee07378e14dd92ce4da23",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 4939,
"upload_time": "2023-03-15T00:36:37",
"upload_time_iso_8601": "2023-03-15T00:36:37.225840Z",
"url": "https://files.pythonhosted.org/packages/df/1e/81907f80da8c6463c02abae9f05394be9a7bbad269e15892740d2ed7026b/gumd-0.0.21.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-15 00:36:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "futzu",
"github_project": "gumd",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "gumd"
}