Skip to main content

mongo-tfrecords - Library that exports mongodb data to tensorflow files (tf-record)

Project description

mongo-tfrecords

mongo-tfrecords - Library that exports mongodb data to tensorflow files (tf-record)

Installation

pip install mongo-tfrecords

Usage examples

# from bash
python3 -m mongo_tfrecords 

# api docs
python3 -m mongo_tfrecords --help
# from python
from mongo_tfrecords import export

export(
    collection="test", 
    database="mongodb://user:password@hostname:27017/database_name?authSource=admin",
    path="/path/to/",
    files_template="{}.tfrecord",
    count_per_file=100000,  # count items per one file
    features=["field1", "field2"],  # fields [int, float, string, bytes, ...],
    skip=10,
    limit=10000,
    verbose=True,  # show progress bar
)

License

Apache License 2.0 (See LICENSE)

Copyright 2020, Vadim Sharay

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mongo_tfrecords-0.0.2.tar.gz (8.9 kB view hashes)

Uploaded Source

Built Distribution

mongo_tfrecords-0.0.2-py3-none-any.whl (10.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page