https://github.com/moshe/click-stream
Click option type for http/https/file inputs
https://github.com/moshe/click-stream
Last synced: 22 days ago
JSON representation
Click option type for http/https/file inputs
- Host: GitHub
- URL: https://github.com/moshe/click-stream
- Owner: moshe
- Created: 2016-10-08T13:25:48.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-03-29T12:08:09.000Z (about 6 years ago)
- Last Synced: 2025-03-25T08:38:12.519Z (about 1 month ago)
- Language: Python
- Size: 5.86 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# click-stream
Click option type for http/https/file inputs## Usage
```python
import click
from click_stream import Stream@click.command()
@click.option('--in', type=Stream())
def streamcli(inp):
click.echo(inp.read())
```## Supported inputs
```
# files
$ cli --in /path/to/file.txt# stdin
$ echo input from stdin | cli --in -# HTTP/S
$ cli http://google.com
```