python-natsort - Natural sorting for python

Property Value
Distribution Ubuntu 17.10 (Artful Aardvark)
Repository Ubuntu Universe i386
Package name python-natsort
Package version 4.0.3
Package release 2
Package architecture all
Package type deb
Installed size 114 B
Download size 22.37 KB
Official Mirror
natsort lets you apply natural sorting to your sequences easily, for example:
>>> from natsort import natsorted
>>> a = ['a2', 'a9', 'a1', 'a4', 'a10']
>>> data = [['a1', 'a5'], ['a1', 'a40'], ['a10', 'a1'], ['a2', 'a5']]
>>> natsorted(a)
['a1', 'a2', 'a4', 'a9', 'a10'
>>> natsorted(data)
[['a1', 'a5'], ['a1', 'a40'], ['a2', 'a5'], ['a10', 'a1']]
natsort identifies the numbers and sorts them separately from strings.
natsort comes with a shell script to use natural sorting in shell scripts. You
can also execute natsort from the command line with python -m natsort.
There exists another natural sorting package for Python called
python-naturalsort. You may prefer that package if you wish to only sort
version numbers.


Package Version Architecture Repository
python-natsort_4.0.3-2_all.deb 4.0.3 all Ubuntu Universe
python-natsort - - -


Name Value
python:any << 2.8
python:any >= 2.7.5-5~


Name Value
python-naturalsort -


Name Value
python-naturalsort -


Type URL
Binary Package python-natsort_4.0.3-2_all.deb
Source Package natsort

Install Howto

  1. Update the package index:
    # sudo apt-get update
  2. Install python-natsort deb package:
    # sudo apt-get install python-natsort




2015-08-26 - Agustin Henze <>
natsort (4.0.3-2) unstable; urgency=medium
* Fix code example in package description (Closes: #778767)
Thanks to Daniele Forsi <>
2015-08-21 - Agustin Henze <>
natsort (4.0.3-1) unstable; urgency=medium
* Fix debian/watch
* Imported Upstream version 4.0.3
2014-10-20 - Agustin Henze <>
natsort (3.5.1-1) unstable; urgency=medium
* Imported Upstream version 3.5.1
* Bumped Standard-Version to 3.9.6 (no changes required)
2014-08-30 - Agustin Henze <>
natsort (3.4.1-2) unstable; urgency=medium
* Add breaks field between python3-natsort and python-natsort <= 3.2.1-1
2014-08-30 - Agustin Henze <>
natsort (3.4.1-1) unstable; urgency=medium
* Imported Upstream version 3.4.1
* Add python-natsort-doc binary package
2014-06-23 - Agustin Henze <>
natsort (3.2.1-1) unstable; urgency=medium
* New Upstream version 3.2.1
2014-06-16 - Agustin Henze <>
natsort (3.2.0-1) unstable; urgency=medium
* Initial release. (Closes: #751813)

See Also

Package Description
python-naturalsort_1.0.3-1.1_all.deb Simple natural order sorting API for Python that just works
python-nautilus_1.1-4ubuntu1_i386.deb Python binding for Nautilus components
python-nav-msgs_1.12.5-3_all.deb Messages relating to Robot OS nav, Python interface
python-nbconvert_4.2.0-4_all.deb Jupyter notebook conversion (Python 2)
python-nbformat-doc_4.4.0-1_all.deb Jupyter notebook format (documentation)
python-nbformat_4.4.0-1_all.deb Jupyter notebook format (Python 2)
python-nbsphinx-doc_0.2.9+ds-2_all.deb Jupyter Notebook Tools for Sphinx -- doc
python-nbsphinx_0.2.9+ds-2_all.deb Jupyter Notebook Tools for Sphinx -- Python
python-nbxmpp-doc_0.5.4-1_all.deb Non blocking Jabber/XMPP Python library, documentation
python-nbxmpp_0.5.4-1_all.deb Non blocking Jabber/XMPP Python library
python-ncap_1.9.2-2.2_i386.deb Python bindings for libncap
python-ncclient-doc_0.5.3-4_all.deb Documentation for python-ncclient (Python library for NETCONF clients)
python-ncclient_0.5.3-4_all.deb Python library for NETCONF clients (Python 2)
python-ndg-httpsclient_0.4.3-1_all.deb enhanced HTTPS support for httplib and urllib2 using PyOpenSSL for Python2
python-nemu_0.3.1-1_all.deb lightweight network emulator embedded in a small python library