Skip to main content

Python 3 CLI for Zipline

Project description

Discord PyPI Codacy Badge PyPI

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.

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_EXPIRE See: https://zipline.diced.tech/docs/guides/upload-options#image-expiration

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

zipline-cli-0.1.4.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

zipline_cli-0.1.4-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file zipline-cli-0.1.4.tar.gz.

File metadata

  • Download URL: zipline-cli-0.1.4.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for zipline-cli-0.1.4.tar.gz
Algorithm Hash digest
SHA256 d7cdbbccf5a859474c233a956fb2e4e1e6065c14d347aa9f78705ca259b2806f
MD5 64a0dc11a3b80cb4776d9bd71f083d59
BLAKE2b-256 9b2783e3d36fa744563d8691d29e7a824924030e2ec20e5a3341842e7cab8952

See more details on using hashes here.

File details

Details for the file zipline_cli-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: zipline_cli-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for zipline_cli-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 16685a67eebf830749a8a881132a0134e7dd652a87c47f6875c85703fbd6c7e9
MD5 6b37f73075538e9cceb8613ff2df8bfe
BLAKE2b-256 458b462d381bf70a98c3164165645b24c8de34890ae9d548fb50a944270be520

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page