Python 3 CLI for Zipline
Project description
Zipline CLI
Python 3 CLI Uploader for Zipline.
Zipline CLI is currently functional and Under Active Development.
Please open a Feature Request
for new features and submit an Issue
for any bugs you find.
- Zipline Docs: https://zipline.diced.tech/
Table of Contents
Quick Start
python3 -m pip install zipline-cli
zipline --setup
Install
From PyPi using pip:
python3 -m pip install zipline-cli
From GitHub using pip:
python3 -m pip install git+https://github.com/cssnr/zipline-cli.git
From Source using pip:
git clone https://github.com/cssnr/zipline-cli.git
python3 -m pip install -e zipline-cli
From Source using setuptools:
git clone https://github.com/cssnr/zipline-cli.git
cd zipline-cli
python3 setup.py install
Uninstall
To completely remove from any above install methods:
python3 -m pip uninstall zipline-cli
CLI Usage
Setup Zipline URL and Token:
zipline --setup
Upload a File:
zipline test.txt
Upload Multiple Files:
zipline file1.txt file2.txt
Create Text File from Input
cat test.txt | zipline
Create Text File from Clipboard
zipline
# Paste or Type contents, followed by a newline, then Ctrl+D (Ctrl+Z on Windows)
Environment Variables
Environment Variables are stored in the .zipline
file in your home directory.
- Location:
~/.zipline
or$HOME/.zipline
Variable | Description |
---|---|
ZIPLINE_URL | URL to your Zipline Instance |
ZIPLINE_TOKEN | Authorization Token from Zipline |
ZIPLINE_EMBED | Set this enable Embed on your uploads |
ZIPLINE_FORMAT | Output Format after upload. Variables: {filename} , {url} and {raw_url} |
ZIPLINE_EXPIRE | See: https://zipline.diced.tech/docs/guides/upload-options#image-expiration |
See .zipline.example for an example .zipline
file.
You may override them by exporting the variables in your current environment
or using the corresponding command line arguments. See -h
for more info.
Python API Reference
Initialize the class with your Zipline URL. Everything else is a header passed as a kwarg. The API does not yet support environment variables.
Zipline Token/Authorization is a header kwarg and can be passed as follows:
from zipline import Zipline
zipline = Zipline('ZIPLINE_URL', authorization='ZIPLINE_TOKEN')
Upload a File
from zipline import Zipline
zipline = Zipline('ZIPLINE_URL', authorization='ZIPLINE_TOKEN')
with open('text.txt') as f:
url = zipline.send_file('test.txt', f)
print(url)
Additional Information
Still have questions, concerns, or comments?
Zipline Guide: Hit That Fresh Nar Nar: youtube.com/watch?v=bJHYo2aGWgE
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
Built Distribution
Hashes for zipline_cli-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6bb8c2a44a051a4324867e7e5376c7b4eafcb2382c15eef103760a220ebd624 |
|
MD5 | ff3dc5c0ae6a28c365ac83f1d7cd1ea6 |
|
BLAKE2b-256 | 398b152b73fcce2ec6d533a9671206e9f0654b0e0b95c46331e7a0139e633461 |