https://github.com/cssnr/zipline-cli
Python 3 CLI Uploader for Zipline
https://github.com/cssnr/zipline-cli
cli python3 zipline
Last synced: 6 months ago
JSON representation
Python 3 CLI Uploader for Zipline
- Host: GitHub
- URL: https://github.com/cssnr/zipline-cli
- Owner: cssnr
- License: mit
- Created: 2023-07-02T05:28:45.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-02-26T22:52:58.000Z (over 1 year ago)
- Last Synced: 2025-06-27T15:06:39.108Z (11 months ago)
- Topics: cli, python3, zipline
- Language: Python
- Homepage: https://pypi.org/project/zipline-cli/
- Size: 59.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://pypi.org/project/zipline-cli/)
[](https://github.com/cssnr/zipline-cli/releases)
[](https://github.com/cssnr/zipline-cli?tab=readme-ov-file#readme)
[](https://pypistats.org/packages/zipline-cli)
[](https://clickpy.clickhouse.com/dashboard/zipline-cli)
[](https://app.codacy.com/gh/cssnr/zipline-cli/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[](https://sonarcloud.io/summary/new_code?id=cssnr_zipline-cli)
[](https://github.com/cssnr/zipline-cli/actions/workflows/test.yaml)
[](https://github.com/cssnr/zipline-cli/actions/workflows/lint.yaml)
[](https://github.com/cssnr/zipline-cli/actions/workflows/release.yaml)
[](https://pypi.org/project/zipline-cli/)
[](https://zipline-cli.cssnr.com/)
[](https://github.com/cssnr/zipline-cli/graphs/commit-activity)
[](https://github.com/cssnr/zipline-cli)
[](https://github.com/cssnr/zipline-cli?tab=readme-ov-file#readme)
[](https://github.com/cssnr/zipline-cli/graphs/contributors)
[](https://github.com/cssnr/cloudflare-purge-cache-action/discussions)
[](https://github.com/cssnr/zipline-cli/forks)
[](https://github.com/cssnr/zipline-cli/stargazers)
[](https://cssnr.github.io/)
[](https://discord.gg/wXy6m2X8wY)
[](https://ko-fi.com/cssnr)
[](https://zipline-cli.cssnr.com/)
# Zipline CLI
- [Quick Start](#quick-start)
- [Install](#install)
- [Usage](#usage)
- [Environment Variables](#environment-variables)
- [API Reference](#api-reference)
- [Support](#support)
- [Contributing](#contributing)
Python 3 CLI File Uploader for [Diced/Zipline](https://github.com/diced/zipline) v3/v4 Upload Server and [Django Files](https://github.com/django-files/django-files).
- Zipline: [https://zipline.diced.sh/](https://zipline.diced.sh/)
- Django Files: [https://django-files.github.io/](https://django-files.github.io/)
> [!TIP]
> If you have any trouble getting started, [support is available](#support).
> You can also [request new features](https://github.com/cssnr/zipline-cli/discussions/new?category=feature-requests)
> or report any [issues](https://github.com/cssnr/zipline-cli/issues/new).
> [!IMPORTANT]
> A new app is in progress which supports ShareX Configurations.
> All new features will be added to this app.
> Please [let us know](https://github.com/cssnr/zipline-cli/discussions/new?category=feature-requests) what you want to see...
```shell
python -m pip install zipline-cli
zipline --setup
```
[](https://zipline-cli.cssnr.com/)
From PyPI: https://pypi.org/p/zipline-cli
```shell
python -m pip install zipline-cli
```
From GitHub using pip.
```shell
python -m pip install git+https://github.com/cssnr/zipline-cli.git
```
From Source using pip.
```shell
git clone https://github.com/cssnr/zipline-cli.git
python -m pip install zipline-cli
```
Uninstall.
```shell
python -m pip uninstall zipline-cli
```
> [!TIP]
> View the [Getting Started](https://zipline-cli.cssnr.com/) guide online.
Setup Zipline URL and Token:
```shell
zipline --setup
```
Upload a File:
```shell
zipline test.txt
```
Upload Multiple Files:
```shell
zipline file1.txt file2.txt
```
Create Text File from Input
```shell
cat test.txt | zipline
```
Create Text File from Clipboard
```shell
zipline
# Paste or Type contents, followed by a newline, then Ctrl+D (Ctrl+Z on Windows)
```
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_FORMAT` | Output Format. Variables: `{filename}`, `{url}` and `{raw_url}` |
See [.zipline.example](.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.
```shell
zipline -h
```
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:
```python
from zipline import Zipline
zipline = Zipline('ZIPLINE_URL', authorization='ZIPLINE_TOKEN')
```
Upload a File
```python
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 general help or to request a feature, see:
- Q&A Discussion: https://github.com/cssnr/zipline-cli/discussions/categories/q-a
- Request a Feature: https://github.com/cssnr/zipline-cli/discussions/categories/feature-requests
- Chat with us on Discord: https://discord.gg/wXy6m2X8wY
If you are experiencing an issue/bug or getting unexpected results, you can:
- Report an Issue: https://github.com/cssnr/zipline-cli/issues
- Provide General Feedback: [https://cssnr.github.io/feedback/](https://cssnr.github.io/feedback/?app=zipline-cli)
- Chat with us on Discord: https://discord.gg/wXy6m2X8wY
All contributions are welcome including [bug reports](https://github.com/cssnr/zipline-cli/issues),
[feature requests](https://github.com/cssnr/zipline-cli/discussions/categories/feature-requests),
or [pull requests](https://github.com/cssnr/zipline-cli/discussions) (please start a discussion).
See the [CONTRIBUTING.md](#contributing-ov-file) for more details.
More Zipline Projects:
- [Zipline CLI](https://zipline-cli.cssnr.com/) - [Source Code](https://github.com/cssnr/zipline-cli?tab=readme-ov-file#readme)
- [Zipline Web Extension](https://zipline-extension.cssnr.com/) - [Source Code](https://github.com/cssnr/zipline-extension?tab=readme-ov-file#readme)
- [Zipline Android Application](https://zipline-android.cssnr.com/) - [Source Code](https://github.com/cssnr/zipline-android?tab=readme-ov-file#readme)
Please consider making a donation to support the development of this project
and [additional](https://cssnr.com/) open source projects.
[](https://ko-fi.com/cssnr)
For a full list of current projects visit: [https://cssnr.github.io/](https://cssnr.github.io/)
