
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
new_reader
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()
0
.1
.11
threefive
, x9k3
, gumd
, m3ufu
, superkabuki
, iframes
, umzz
,showcues
,six2scte35
and sideways
.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'
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
socket.SO_RCVBUF
to the maximum value allowed by the OS for UDP
and Multicast
.socket.SO_RCVBUF
can also be set like this:
OpenBSD
sysctl net.inet.udp.recvspace
Linux
sysctl -w net.core.rmem_max=6815744
Windows
I.have.no.idea
FAQs
Read http(s), multicast, and udp streams like files
We found that new-reader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.