python-natsort - Natural sorting for python

Property Value
Distribution Ubuntu 16.04 LTS (Xenial Xerus)
Repository Ubuntu Universe amd64
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.7.5-5~
python:any << 2.8


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-4_amd64.deb Python binding for Nautilus components
python-nav-msgs_1.12.3-5_all.deb Messages relating to Robot OS nav, Python interface
python-nbxmpp-doc_0.5.3-1_all.deb Non blocking Jabber/XMPP Python library, documentation
python-nbxmpp_0.5.3-1_all.deb Non blocking Jabber/XMPP Python library
python-ncap_1.9.2-2.1_amd64.deb Python bindings for libncap
python-ncclient_0.4.7-1_all.deb Python library for NETCONF clients
python-nemu_0.2-2_all.deb lightweight network emulator embedded in a small python library
python-neo_0.3.3-2_all.deb Python IO library for electrophysiological data formats
python-netcdf4_1.2.2-2_amd64.deb Python interface to the netCDF4 (network Common Data Form) library
python-netfilter_0.6.3-1_all.deb Python module for manipulating netfilter rules (Python 2)
python-netlib_0.15.1-1_amd64.deb collection of network utility classes (python2)
python-netsnmp_5.7.3+dfsg-1ubuntu4_amd64.deb SNMP (Simple Network Management Protocol) Python support
python-netsyslog_0.1.0+dp2-1_all.deb Python Modules for emitting and receiving syslog events
python-networking-arista_2015.2.0-1_all.deb OpenStack virtual network service - Arista plugin