Metadata-Version: 2.1
Name: mongoct
Version: 0.1.2
Summary: MongoDB Change Streams tracker
Home-page: https://github.com/bufferapp/mongoct
Author: David Gasquez
Author-email: davidgasquez@buffer.com
License: MIT
Keywords: mongodb,change-stream,crawler
Platform: UNKNOWN
Description-Content-Type: text/markdown
Requires-Dist: pymongo
Requires-Dist: click
Requires-Dist: dnspython

# mongoct

[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](LICENSE)
[![PyPI version](https://badge.fury.io/py/mongoct.svg)](https://badge.fury.io/py/mongoct)

MongoDB [Change Streams](https://docs.mongodb.com/manual/changeStreams/) tracker. Using `mongoct` allows you to pipe the MongoDB collection changes to another program or file.

## Installation

To install `mongoct`, simply run:

```bash
$ pip install mongoct
```

## Quickstart

Before executing the command line tool you'll need a MongoDB URI connection in your environment (`MONGODB_URI`)¹.

Tracking changes in a certain collection is as easy as running the following command:

```bash
$ mongoct company posts
```

Changes will start flowing as JSON at the same time they're applied to the `post` collection in the `company` database.

You can now pipe the data to another program like [`jq`](https://stedolan.github.io/jq/) or save it to a file for latter processing.

¹ It's also possible to specify the MongoDB URI as an option (`mongoct company posts -u "mongodb://user:pass@host/db"`)


