https://github.com/bufferapp/mongoct
MongoDB Change Streams tracker.
https://github.com/bufferapp/mongoct
Last synced: 9 months ago
JSON representation
MongoDB Change Streams tracker.
- Host: GitHub
- URL: https://github.com/bufferapp/mongoct
- Owner: bufferapp
- License: mit
- Created: 2018-06-13T11:47:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-16T10:35:30.000Z (about 7 years ago)
- Last Synced: 2025-03-29T10:23:46.708Z (10 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mongoct
[](LICENSE)
[](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"`)