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:

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 setuptools:

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

Uninstall:

python3 -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.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

zipline_cli-0.1.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zipline-cli-0.1.1.tar.gz
  • Upload date:
  • Size: 5.4 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.1.tar.gz
Algorithm Hash digest
SHA256 d564a50c95119cdcd2d87ead9385e2cdbb3b35a91bb1db869e3da2a67b21d115
MD5 5914e2461682820c2ec16f47112cd8db
BLAKE2b-256 4de9769de126eeb0cc58452d9ffc6056b8222a60b015fb4383ead066c00fa403

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zipline_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 937b7c86bbb4a519b1d59b7ef57fc1129b2c01f83126cba27f359b4031cd9307
MD5 0855c44de8002d1c8148caaba4609152
BLAKE2b-256 2b3a2b2a5172526b54354b6ca9e48336059a3a09c827dd22182924c378982504

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