Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Flunn - Simple CBOR En/Decoder ##############################
Flunn is also a Python library providing CBOR [RFC7049] encoding and decoding with a traditional buffered and a streaming interface. (flunn is a fork of flynn)
The Flunn API is really simple and inspired by existing Python serialisation modules like json and pickle. The flunn module has four methods called dumps, dump, loads and load, where dumps will return the serialised input as bytes string, while dump will write the serialised input to a file descriptor. The same applies to loads and load.
>>> flunn.dumps([1, [2, 3]])
b'\x82\x01\x82\x02\x03'
>>> flunn.loads(b'\x82\x01\x82\x02\x03')
[1, [2, 3]]
Furthermore, Flunn supports generators and other iterables as input for streaming support:
>>> flunn.dumps(range(5))
b'\x9f\x00\x01\x02\x03\x04\xff'
>>> flunn.loads(b'\x9f\x00\x01\x02\x03\x04\xff')
[0, 1, 2, 3, 4]
Or to generate a map using an iterable:
>>> flunn.dumps(flunn.mapping(((a, a) for a in range(5))))
b'\xbf\x00\x00\x01\x01\x02\x02\x03\x03\x04\x04\xff'
>>> flunn.loads(b'\xbf\x00\x00\x01\x01\x02\x02\x03\x03\x04\x04\xff')
{0: 0, 1: 1, 2: 2, 3: 3, 4: 4}
© 2015 Sokolov Yura aka funny_falcon © 2013 Fritz Conrad Grimpen
The code is licensed under the MIT license, provided in the COPYING file of the Flunn distribution.
FAQs
Simple decoder and encoder for CBOR (fork of flynn)
We found that flunn 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.