Name | new-reader JSON |
Version |
0.1.13
JSON |
| download |
home_page | https://github.com/futzu/new_reader |
Summary | Read http(s), multicast, and udp streams like files |
upload_time | 2024-11-16 09:02:08 |
maintainer | None |
docs_url | None |
author | Adrian |
requires_python | >=3.6 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# `new_reader`
## Read `stdin`, `files`, `multicast`, `udp`, and `http(s)` URIs the same way.
```python3
from new_reader import reader
rdr = reader('udp://@235.35.3.5:3535')
rdr.read()
```
## latest version is `0`.`1`.`11`
* Critical Fix for Multicast
![image](https://user-images.githubusercontent.com/52701496/205797792-aee34f1c-039c-427b-87f4-709c3b6a8aa2.png)
## new_reader is used by [`threefive`](https://github.com/futzu/threefive), [`x9k3`](https://github.com/futzu/x9k3), [`gumd`](https://github.com/futzu/gumd), [`m3ufu`](https://github.com/futzu/m3ufu), [`superkabuki`](https://github.com/futzu/superkabuki), [`iframes`](https://github.com/futzu/iframes) , [`umzz`](https://github.com/futzu/umzz),[`showcues`](https://github.com/futzu/showcues),[`six2scte35`](https://github.com/futzu/six2scte35)and [`sideways`](https://github.com/futzu/sideways).
## How is `new_reader.reader` used?
```js
# print a mpegts packet header via https
>>>> from new_reader import reader
>>>> with reader('https://so.slo.me/longb.ts') as rdr:
.... packet = rdr.read(188)
.... print(packet[:4])
....
b'G@\x11\x10'
```
#### | more
- [x] `Files`
```js
from new_reader import reader
with reader("/home/you/video.ts") as data:
fu = data.read()
```
- [x] `HTTP(S)`
```js
from new_reader import reader
with reader('http://iodisco.com/') as disco:
disco.read()
# Add http headers like this
with reader('http://iodisco.com/',headers={"myHeader":"DOOM"}) as doom:
doom.read()
```
- [x] `Multicast`
```smalltalk
from new_reader import reader
with reader("udp://@227.1.3.10:4310") as data:
data.read(8192)
```
- [x] `UDP`
```lua
from new_reader import reader
udp_data =reader("udp://1.2.3.4:5555")
chunks = [udp_data.read(188) for i in range(0,1024)]
udp_data.close()
```
### `UDP` and `Multicast`
* reader will set `socket.SO_RCVBUF` to the maximum value allowed by the OS for `UDP` and `Multicast`.
* `socket.SO_RCVBUF` can also be set like this:
* On `OpenBSD`
```js
sysctl net.inet.udp.recvspace
```
* On `Linux`
```js
sysctl -w net.core.rmem_max=6815744
```
* On `Windows`
```js
I.have.no.idea
```
Raw data
{
"_id": null,
"home_page": "https://github.com/futzu/new_reader",
"name": "new-reader",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Adrian",
"author_email": "spam@iodisco.com",
"download_url": "https://files.pythonhosted.org/packages/e0/4e/f444bfa8a506182365eb0430cf60fb47709e1f4e96e22111472f358b8099/new_reader-0.1.13.tar.gz",
"platform": "all",
"description": "# `new_reader` \n## Read `stdin`, `files`, `multicast`, `udp`, and `http(s)` URIs the same way. \n```python3\nfrom new_reader import reader\n\nrdr = reader('udp://@235.35.3.5:3535')\nrdr.read()\n```\n\n## latest version is `0`.`1`.`11` \n* Critical Fix for Multicast\n\n![image](https://user-images.githubusercontent.com/52701496/205797792-aee34f1c-039c-427b-87f4-709c3b6a8aa2.png)\n\n## new_reader is used by [`threefive`](https://github.com/futzu/threefive), [`x9k3`](https://github.com/futzu/x9k3), [`gumd`](https://github.com/futzu/gumd), [`m3ufu`](https://github.com/futzu/m3ufu), [`superkabuki`](https://github.com/futzu/superkabuki), [`iframes`](https://github.com/futzu/iframes) , [`umzz`](https://github.com/futzu/umzz),[`showcues`](https://github.com/futzu/showcues),[`six2scte35`](https://github.com/futzu/six2scte35)and [`sideways`](https://github.com/futzu/sideways).\n\n\n ## How is `new_reader.reader` used?\n ```js\n # print a mpegts packet header via https\n\n>>>> from new_reader import reader\n>>>> with reader('https://so.slo.me/longb.ts') as rdr:\n.... packet = rdr.read(188)\n.... print(packet[:4])\n.... \nb'G@\\x11\\x10'\n```\n\n\n#### | more\n\n- [x] `Files`\n```js\n from new_reader import reader\n\n with reader(\"/home/you/video.ts\") as data:\n fu = data.read()\n```\n- [x] `HTTP(S)`\n```js\n from new_reader import reader\n\n with reader('http://iodisco.com/') as disco:\n disco.read()\n\n # Add http headers like this \n\n with reader('http://iodisco.com/',headers={\"myHeader\":\"DOOM\"}) as doom:\n doom.read()\n\n```\n- [x] `Multicast`\n```smalltalk\n from new_reader import reader\n\n with reader(\"udp://@227.1.3.10:4310\") as data:\n data.read(8192)\n```\n- [x] `UDP`\n```lua\n from new_reader import reader\n\n udp_data =reader(\"udp://1.2.3.4:5555\")\n chunks = [udp_data.read(188) for i in range(0,1024)]\n udp_data.close()\n```\n ### `UDP` and `Multicast`\n * reader will set `socket.SO_RCVBUF` to the maximum value allowed by the OS for `UDP` and `Multicast`.\n * `socket.SO_RCVBUF` can also be set like this:\n * On `OpenBSD` \n ```js\n sysctl net.inet.udp.recvspace\n ```\n * On `Linux`\n ```js\n sysctl -w net.core.rmem_max=6815744\n ```\n * On `Windows`\n ```js\n I.have.no.idea\n ```\n\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Read http(s), multicast, and udp streams like files",
"version": "0.1.13",
"project_urls": {
"Homepage": "https://github.com/futzu/new_reader"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b3dd9b938ad6c8601494adeff5a1f69653686fe0a27ba8d3a328d1974443e291",
"md5": "5d834f35ea94b44044aae2183bc06ce3",
"sha256": "93db57e3e4691017a752da7b38b8efe72a547ec377eefda6cf2f2e6ba196d1f5"
},
"downloads": -1,
"filename": "new_reader-0.1.13-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5d834f35ea94b44044aae2183bc06ce3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 3704,
"upload_time": "2024-11-16T09:02:07",
"upload_time_iso_8601": "2024-11-16T09:02:07.070361Z",
"url": "https://files.pythonhosted.org/packages/b3/dd/9b938ad6c8601494adeff5a1f69653686fe0a27ba8d3a328d1974443e291/new_reader-0.1.13-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e04ef444bfa8a506182365eb0430cf60fb47709e1f4e96e22111472f358b8099",
"md5": "9752f7afcc1f8fe6c0cdfad51de4c56c",
"sha256": "63104164d0fd309dc7be91bd54f800b43b7fe5c991ba03769be7b90c0b8f4519"
},
"downloads": -1,
"filename": "new_reader-0.1.13.tar.gz",
"has_sig": false,
"md5_digest": "9752f7afcc1f8fe6c0cdfad51de4c56c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3418,
"upload_time": "2024-11-16T09:02:08",
"upload_time_iso_8601": "2024-11-16T09:02:08.600126Z",
"url": "https://files.pythonhosted.org/packages/e0/4e/f444bfa8a506182365eb0430cf60fb47709e1f4e96e22111472f358b8099/new_reader-0.1.13.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-16 09:02:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "futzu",
"github_project": "new_reader",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "new-reader"
}