Skip to main content

Arrange downloaded youtube videos

Project description


This program sorts the already downloaded youtube videos present in a folder by renaming them and adding serial number before their names.


Youtube Data API v3 is required. Get it from here


Recommended (To install pipx click here)
pipx install ytsort
pip install ytsort

Or upgrade by:

pipx upgrade ytsort
pip install --upgrade ytsort


Set Youtube API Key to the environment variable 'YOUTUBE_DATA_API_KEY' (for ease of use, but not required).


Usage: ytsort [OPTIONS]


  -c, --character TEXT    Character after serial.
  -z, --zero              Add zero before serial numbers to make them all of
                          equal length.
  -x, --nozero            Don't add zero before serial numbers.
  -d, --defaults          Change the default configurations and exit.
  -r, --remove-serial     Remove the serial numbers from the local files upto
                          the given character
  --help                  Show this message and exit.

Install from source

Poetry is required. For installation click here.

  1. Download the source and install the dependencies by running:

    git clone
    cd YTSort
    poetry install
  2. Not required but for ease of use

    a) Set Youtube API Key to the environment variable 'YOUTUBE_DATA_API_KEY'


    b) edit the

    'api_key': os.environ.get('YOUTUBE_DATA_API_KEY'), to 'api_key': <Your Youtube API key>,


In the source folder containing pyproject.toml

poetry shell

then cd into the folder containing youtube videos and execute:


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

ytsort-1.4.0.tar.gz (13.7 kB view hashes)

Uploaded Source

Built Distribution

ytsort-1.4.0-py3-none-any.whl (15.2 kB view hashes)

Uploaded Python 3

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