Skip to main content

Share files with a single command

Project description

fileup - Share files with a single command

PyPI Build Status CodeCov

fileup Logo

fileup is your go-to Python package for hassle-free uploading and sharing of files right from your command-line interface. You can set a time limit after which the file will be automatically removed, ensuring the security of your data.

[!TIP] Just call fu myfile.txt to upload it and get the URL in your clipboard!

Table of Contents

Features

  • 📤 Upload via FTP or SCP (using SSH config)
  • ⏰ Automatic file expiration and cleanup
  • 🔗 Smart URLs: Jupyter notebooks → nbviewer, image markdown, direct links
  • 📋 Automatic clipboard copy (macOS)
  • ⚡ Simple config using ~/.config/fileup/config.ini
  • 🔐 Supports SSH keys and password authentication
  • 🪶 Zero dependencies - uses Python standard library
  • 📜 Works as a single script or installed package
  • 🐍 Supports Python ≥3.10

Installation

To install fileup, simply run the following command:

pip install -U fileup

or use uv or pipx:

uv tool install fileup
pipx install fileup

Configuration

Before you can start sharing your files, you'll need to create a configuration file at ~/.config/fileup/config.ini with the following structure:

# ~/.config/fileup/config.ini
[default]
protocol = ftp  # or scp
hostname = example.com  # or the Host from your ~/.ssh/config
base_folder = /path/to/files  # where files are stored on the server
file_up_folder =  # subdirectory in URL, can be empty
url = files.example.com  # the actual URL where files are accessible

[ftp]
username = my_user_name
password = my_difficult_password

[scp]
# If empty, will use your SSH config
username =
# If using SSH config, no need for these
private_key =
password =

FTP Configuration

For FTP uploads, you need to provide both username and password in the [ftp] section.

SCP Configuration

For SCP uploads, you have two options:

  1. Use your SSH config by setting protocol = scp and using a hostname from your ~/.ssh/config
  2. Explicitly configure SCP by providing username and optionally private_key in the [scp] section

Usage

For a list of available commands, type fu -h.

In a nutshell, you can use fileup by running:

fu filename

The command supports several options:

  • -t DAYS, --time DAYS: Set an expiration time in days (default: 90, use 0 for no expiration)
  • -d, --direct: Return a direct URL without any prefixes
  • -i, --img: Return the URL formatted for markdown image embedding

This is the output of fu -h:

usage: fu [-h] [-t TIME] [-d] [-i] filename

Publish a file.

Create a config file at ~/.config/fileup/config.ini with the following structure:

[default]
protocol = ftp  # or scp
hostname = example.com  # or the Host from your ~/.ssh/config
base_folder = /path/to/files  # where files are stored on the server
file_up_folder =  # subdirectory in URL, can be empty
url = files.example.com  # the actual URL where files are accessible

[ftp]
username = my_user_name
password = my_difficult_password

[scp]
# If empty, will use your SSH config
username =
# If using SSH config, no need for these
private_key =
password =

positional arguments:
  filename

options:
  -h, --help       show this help message and exit
  -t, --time TIME  If time is 0 the file will never be deleted, default is 90 days.
  -d, --direct
  -i, --img

Special Features

  • Jupyter Notebooks: If you're uploading a Jupyter notebook (.ipynb), the returned URL will be accessible via nbviewer.jupyter.org
  • Automatic Deletion: Files with expiration times are automatically removed when their time is up
  • URL Copying: On macOS, the URL is automatically copied to your clipboard

macOS Integration

fileup currently supports the pbcopy command, so the URL will be automatically copied to your clipboard on macOS systems.

Limitations

  • The automatic clipboard copying feature is only available for macOS users
  • FTP passwords are stored in plain text; use with caution
  • SCP implementation requires the ssh and scp commands to be available

Give fileup a try today and experience the convenience of effortless file sharing right from your command-line!

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

fileup-2.0.1.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fileup-2.0.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file fileup-2.0.1.tar.gz.

File metadata

  • Download URL: fileup-2.0.1.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fileup-2.0.1.tar.gz
Algorithm Hash digest
SHA256 bd9f4e40d5fb06f4956d7440fed0de178e32cad692d32423a90addf8d07b0d87
MD5 32ccb2ed6d0e7796c1ffcf7fc5965554
BLAKE2b-256 84fa9b2fed54761ece60532024724eafa22c17b8caa48ef4c130676be652d93e

See more details on using hashes here.

Provenance

The following attestation bundles were made for fileup-2.0.1.tar.gz:

Publisher: release.yml on basnijholt/fileup

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fileup-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: fileup-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fileup-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4f41de828eddcc7cbdd463580ad5699e945684cb44b5d25cfe392c77358a674a
MD5 33fee41349102c6efea6bf2421051531
BLAKE2b-256 6959a877d68d98c7679d850679584e871772cece85869d590562f43f1f633c32

See more details on using hashes here.

Provenance

The following attestation bundles were made for fileup-2.0.1-py3-none-any.whl:

Publisher: release.yml on basnijholt/fileup

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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