TFReecord
Read & Write TFRecord without heavy Tensorflow.
pip3 install tfreecord
Example
Write TFRecord
import tfreecord
writer = tfreecord.RecordWriter()
feature = {
'id': writer.int64_feature(759),
'text': writer.bytes_feature("Now rides our knight".encode("utf-8")),
'label': writer.bytes_feature("poem".encode("utf-8")),
}
with open("poems.tfrecord", "ab") as f:
f.write(writer.encode_example(feature))
Read TFRecord
import tfreecord
reader = tfreecord.RecordReader()
for data in reader.read_from_tfrecord("poems.tfrecord"):
print(data)
Thanks to Jong Wook Kim blog post about TFRecords here and his tfrecord_lite library.
Metadata
Release files for tfreecord 1.0.0
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 |
|---|---|---|---|---|
| tfreecord-1.0.0.tar.gz | 5.8 kB | Without provenance | Details for tfreecord-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tfreecord-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for tfreecord-1.0.0-py3-none-any.whl |
Total release size: 11.7 kB
Release files / tfreecord-1.0.0.tar.gz
| Download URL | tfreecord-1.0.0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41210ea9f6062503b64d99a93157cd3d28bba2a7560135fcc2cf8539e27f95b0
|
|
BLAKE2b-256 checksum How to use checksums |
fd053c5292dc5c95677fd080c9c04771f1978b683025825bf439e3df7f5247d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.6
|
Release files / tfreecord-1.0.0-py3-none-any.whl
| Download URL | tfreecord-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f15b9086d822602a8afb89a9351fcc792ec9ca12082cdd482ae41ee006b47394
|
|
BLAKE2b-256 checksum How to use checksums |
4041e61f0be62c62ae2fdea2940a8c0b47ede15405acda9b587a061fcb7aebbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.6
|
Security for tfreecord 1.0.0
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.