Skip to main content

Python 3 CLI for Zipline

Project description

Discord Codacy Badge PyPI

Zipline CLI

Python 3 CLI Uploader for Zipline.

This is currently a WIP and not complete, but has some useful functions.

Install

From PyPi using pip:

python -m pip install zipline-cli

From GitHub using pip:

python -m pip install git+https://github.com/cssnr/zipline-cli.git

From Source using setuptools:

git clone https://github.com/cssnr/zipline-cli.git
cd zipline-cli
python setup.py install

Uninstall:

python -m pip uninstall zipline-cli

CLI Usage

You will need a Zipline URL and Token to use the utility.

Setup Zipline URL and Token:

zipline --setup

Upload a File:

zipline test.txt

Create Text File from Input

cat test.txt | zipline 

Create Text File from Text

zipline
# type or paste contents followed by Ctrl+D (Ctrl+Z on Windows)

Environment Variables

Environment Variables are stored in the .zipline file in your home directory.

  • Location: ~/.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 also override them by exporting the variables in your current environment.

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

If you have more questions, concerns, or comments? Join our Discord for more information...

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.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

zipline_cli-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zipline-cli-0.1.0.tar.gz
  • Upload date:
  • Size: 5.0 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.0.tar.gz
Algorithm Hash digest
SHA256 8606a38319086417781454a32bba34d7b0b819aa29652475826de6f2be73450b
MD5 c0e81fd2dd5389eb510546610e466d30
BLAKE2b-256 8631f54e83c2c2adb4b1d89b34af8a7c0744e1066da582ab1fc3889d2cff7ded

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zipline_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae23e29d7f3846dbddfcdf16816e2bceade3bf5828f2add7b9bc026172ec5393
MD5 37ca8d809a16abe8c34dbcb5640acf78
BLAKE2b-256 7b7ae18f00f02da422698711a89ec506cde0530ceb21dc684a0fabf464020b9c

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