Skip to content

Reference

Zipline CLI

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. Variables: {filename}, {url} and {raw_url}
ZIPLINE_EXPIRE Reference: Zipline / Django Files

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.

zipline -h

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)

For more details, view the src/zipline.py file.

 

Question

If you need help getting started or run into any issues, support is available!