new_reader
Read stdin, files, multicast, udp, and http(s) URIs the same way.
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
new_reader is used by threefive, x9k3, gumd, m3ufu, superkabuki, iframes , umzz,showcues,six2scte35and sideways.
How is new_reader.reader used?
# 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
-
Files
from new_reader import reader
with reader("/home/you/video.ts") as data:
fu = data.read()
-
HTTP(S)
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()
-
Multicast
from new_reader import reader
with reader("udp://@227.1.3.10:4310") as data:
data.read(8192)
-
UDP
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_RCVBUFto the maximum value allowed by the OS forUDPandMulticast. socket.SO_RCVBUFcan also be set like this:- On
OpenBSD
sysctl net.inet.udp.recvspace
- On
Linux
sysctl -w net.core.rmem_max=6815744
- On
Windows
I.have.no.idea
- On
Metadata
Release files for new-reader 0.1.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| new_reader-0.1.13.tar.gz | 3.4 kB | Without provenance | Details for new_reader-0.1.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| new_reader-0.1.13-py3-none-any.whl | Python 3 | none | any | Details for new_reader-0.1.13-py3-none-any.whl |
Total release size: 7.1 kB
Release files / new_reader-0.1.13.tar.gz
| Download URL | new_reader-0.1.13.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63104164d0fd309dc7be91bd54f800b43b7fe5c991ba03769be7b90c0b8f4519
|
|
BLAKE2b-256 checksum How to use checksums |
e04ef444bfa8a506182365eb0430cf60fb47709e1f4e96e22111472f358b8099
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.9
|
Release files / new_reader-0.1.13-py3-none-any.whl
| Download URL | new_reader-0.1.13-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
93db57e3e4691017a752da7b38b8efe72a547ec377eefda6cf2f2e6ba196d1f5
|
|
BLAKE2b-256 checksum How to use checksums |
b3dd9b938ad6c8601494adeff5a1f69653686fe0a27ba8d3a328d1974443e291
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.9
|
Security for new-reader 0.1.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.