https://github.com/bufferapp/pipub
Pipe data from the command line to Google Pubsub.
https://github.com/bufferapp/pipub
Last synced: 5 months ago
JSON representation
Pipe data from the command line to Google Pubsub.
- Host: GitHub
- URL: https://github.com/bufferapp/pipub
- Owner: bufferapp
- License: mit
- Created: 2018-09-21T16:23:49.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2020-08-10T10:06:44.000Z (over 5 years ago)
- Last Synced: 2025-02-01T17:47:05.945Z (12 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pipub: Pipe data from the command line to Google Pubsub
[](LICENSE)
[](https://badge.fury.io/py/pipub)
Pipub is a command line tool that makes it easy to stream data to Google Cloud Pubsub.
## Installation
To install `pipub`, simply run:
```bash
$ pip install pipub
```
## Quickstart
Before executing the command line tool you'll need a Google Cloud Project with a [Pubsub topic](https://cloud.google.com/pubsub/docs/admin).
Sending a local [new line delimited JSON file](http://ndjson.org/) to a Pubsub topic `test` is as simple as running:
```bash
$ cat file.json | pipub test -p project-name
```
Peam will take care of sending each line as a new message to the `test` topic.
This simplicity allows you to pipe the data to other programs before sending the data.