textproc/py-natsort - The NetBSD Packages Collection

Natural sorting for python

When you try to sort a list of strings that contain numbers, the
normal python sort algorithm sorts lexicographically, so you might
not get the results that you expect:

>>> a = ['a2', 'a9', 'a1', 'a4', 'a10']
>>> sorted(a)
['a1', 'a10', 'a2', 'a4', 'a9']

Notice that it has the order ('1', '10', '2') - this is because the
list is being sorted in lexicographical order, which sorts numbers
like you would letters (i.e. 'b', 'ba', 'c').

natsort provides a function natsorted that helps sort lists
"naturally", either as real numbers (i.e. signed/unsigned floats
or ints), or as versions. Using natsorted is simple:

>>> from natsort import natsorted
>>> a = ['a2', 'a9', 'a1', 'a4', 'a10']
>>> natsorted(a)
['a1', 'a2', 'a4', 'a9', 'a10']

natsorted identifies numbers anywhere in a string and sorts them
naturally.

Build dependencies

pkgtools/cwrappers

Runtime dependencies

devel/py-setuptools lang/python39 lang/python39

Binary packages

OSArchitectureVersion
NetBSD 8.0earmv7hfpy36-natsort-7.1.1.tgz
NetBSD 8.0earmv7hfpy37-natsort-7.1.1.tgz
NetBSD 8.0earmv7hfpy38-natsort-7.1.1.tgz
NetBSD 8.0earmv7hfpy39-natsort-7.1.1.tgz
NetBSD 8.0earmv7hfpy36-natsort-7.1.1.tgz
NetBSD 8.0earmv7hfpy37-natsort-7.1.1.tgz
NetBSD 8.0earmv7hfpy38-natsort-7.1.1.tgz
NetBSD 8.0earmv7hfpy39-natsort-7.1.1.tgz
NetBSD 8.0earmv7hfpy36-natsort-7.1.1.tgz
NetBSD 8.0earmv7hfpy37-natsort-7.1.1.tgz
NetBSD 8.0earmv7hfpy38-natsort-7.1.1.tgz
NetBSD 8.0earmv7hfpy39-natsort-7.1.1.tgz
NetBSD 8.0i386py36-natsort-7.1.1.tgz
NetBSD 8.0i386py37-natsort-7.1.1.tgz
NetBSD 8.0i386py38-natsort-7.1.1.tgz
NetBSD 8.0i386py39-natsort-7.1.1.tgz
NetBSD 8.0i386py36-natsort-7.1.1.tgz
NetBSD 8.0i386py37-natsort-7.1.1.tgz
NetBSD 8.0i386py38-natsort-7.1.1.tgz
NetBSD 8.0i386py39-natsort-7.1.1.tgz
NetBSD 8.0powerpcpy36-natsort-7.1.1.tgz
NetBSD 8.0powerpcpy37-natsort-7.1.1.tgz
NetBSD 8.0powerpcpy38-natsort-7.1.1.tgz
NetBSD 8.0powerpcpy39-natsort-7.1.1.tgz
NetBSD 8.0powerpcpy36-natsort-7.1.1.tgz
NetBSD 8.0powerpcpy37-natsort-7.1.1.tgz
NetBSD 8.0powerpcpy38-natsort-7.1.1.tgz
NetBSD 8.0powerpcpy39-natsort-7.1.1.tgz
NetBSD 8.0powerpcpy36-natsort-7.1.1.tgz
NetBSD 8.0powerpcpy37-natsort-7.1.1.tgz
NetBSD 8.0powerpcpy38-natsort-7.1.1.tgz
NetBSD 8.0powerpcpy39-natsort-7.1.1.tgz
NetBSD 8.0powerpcpy36-natsort-7.1.1.tgz
NetBSD 8.0powerpcpy37-natsort-7.1.1.tgz
NetBSD 8.0powerpcpy38-natsort-7.1.1.tgz
NetBSD 8.0powerpcpy39-natsort-7.1.1.tgz
NetBSD 8.0x86_64py36-natsort-7.1.1.tgz
NetBSD 8.0x86_64py37-natsort-7.1.1.tgz
NetBSD 8.0x86_64py38-natsort-7.1.1.tgz
NetBSD 8.0x86_64py39-natsort-7.1.1.tgz
NetBSD 8.0x86_64py36-natsort-7.1.1.tgz
NetBSD 8.0x86_64py37-natsort-7.1.1.tgz
NetBSD 8.0x86_64py38-natsort-7.1.1.tgz
NetBSD 8.0x86_64py39-natsort-7.1.1.tgz
NetBSD 9.0aarch64py36-natsort-7.1.1.tgz
NetBSD 9.0aarch64py37-natsort-7.1.1.tgz
NetBSD 9.0aarch64py38-natsort-7.1.1.tgz
NetBSD 9.0aarch64py39-natsort-7.1.1.tgz
NetBSD 9.0aarch64py36-natsort-7.1.1.tgz
NetBSD 9.0aarch64py37-natsort-7.1.1.tgz
NetBSD 9.0aarch64py38-natsort-7.1.1.tgz
NetBSD 9.0aarch64py39-natsort-7.1.1.tgz
NetBSD 9.0aarch64py36-natsort-7.1.1.tgz
NetBSD 9.0aarch64py37-natsort-7.1.1.tgz
NetBSD 9.0aarch64py38-natsort-7.1.1.tgz
NetBSD 9.0aarch64py39-natsort-7.1.1.tgz
NetBSD 9.0alphapy36-natsort-7.1.1.tgz
NetBSD 9.0alphapy37-natsort-7.1.1.tgz
NetBSD 9.0alphapy38-natsort-7.1.1.tgz
NetBSD 9.0alphapy39-natsort-7.1.1.tgz
NetBSD 9.0alphapy36-natsort-7.1.1.tgz
NetBSD 9.0alphapy37-natsort-7.1.1.tgz
NetBSD 9.0alphapy38-natsort-7.1.1.tgz
NetBSD 9.0alphapy39-natsort-7.1.1.tgz
NetBSD 9.0alphapy36-natsort-7.1.1.tgz
NetBSD 9.0alphapy37-natsort-7.1.1.tgz
NetBSD 9.0alphapy38-natsort-7.1.1.tgz
NetBSD 9.0alphapy39-natsort-7.1.1.tgz
NetBSD 9.0earmpy38-natsort-7.1.1.tgz
NetBSD 9.0earmpy38-natsort-7.1.1.tgz
NetBSD 9.0earmpy38-natsort-7.1.1.tgz
NetBSD 9.0earmv6hfpy36-natsort-7.1.1.tgz
NetBSD 9.0earmv6hfpy37-natsort-7.1.1.tgz
NetBSD 9.0earmv6hfpy38-natsort-7.1.1.tgz
NetBSD 9.0earmv6hfpy39-natsort-7.1.1.tgz
NetBSD 9.0earmv6hfpy36-natsort-7.1.1.tgz
NetBSD 9.0earmv6hfpy37-natsort-7.1.1.tgz
NetBSD 9.0earmv6hfpy38-natsort-7.1.1.tgz
NetBSD 9.0earmv6hfpy39-natsort-7.1.1.tgz
NetBSD 9.0earmv6hfpy36-natsort-7.1.1.tgz
NetBSD 9.0earmv6hfpy37-natsort-7.1.1.tgz
NetBSD 9.0earmv6hfpy38-natsort-7.1.1.tgz
NetBSD 9.0earmv6hfpy39-natsort-7.1.1.tgz
NetBSD 9.0earmv7hfpy36-natsort-7.1.1.tgz
NetBSD 9.0earmv7hfpy37-natsort-7.1.1.tgz
NetBSD 9.0earmv7hfpy38-natsort-7.1.1.tgz
NetBSD 9.0earmv7hfpy39-natsort-7.1.1.tgz
NetBSD 9.0earmv7hfpy36-natsort-7.1.1.tgz
NetBSD 9.0earmv7hfpy37-natsort-7.1.1.tgz
NetBSD 9.0earmv7hfpy38-natsort-7.1.1.tgz
NetBSD 9.0earmv7hfpy39-natsort-7.1.1.tgz
NetBSD 9.0earmv7hfpy36-natsort-7.1.1.tgz
NetBSD 9.0earmv7hfpy37-natsort-7.1.1.tgz
NetBSD 9.0earmv7hfpy38-natsort-7.1.1.tgz
NetBSD 9.0earmv7hfpy39-natsort-7.1.1.tgz
NetBSD 9.0earmv7hfpy36-natsort-7.1.1.tgz
NetBSD 9.0earmv7hfpy37-natsort-7.1.1.tgz
NetBSD 9.0earmv7hfpy38-natsort-7.1.1.tgz
NetBSD 9.0earmv7hfpy39-natsort-7.1.1.tgz
NetBSD 9.0i386py36-natsort-7.1.1.tgz
NetBSD 9.0i386py37-natsort-7.1.1.tgz
NetBSD 9.0i386py38-natsort-7.1.1.tgz
NetBSD 9.0i386py39-natsort-7.1.1.tgz
NetBSD 9.0i386py36-natsort-7.1.1.tgz
NetBSD 9.0i386py37-natsort-7.1.1.tgz
NetBSD 9.0i386py38-natsort-7.1.1.tgz
NetBSD 9.0i386py39-natsort-7.1.1.tgz
NetBSD 9.0mips64ebpy36-natsort-7.1.1.tgz
NetBSD 9.0mips64ebpy37-natsort-7.1.1.tgz
NetBSD 9.0mips64ebpy38-natsort-7.1.1.tgz
NetBSD 9.0mips64ebpy39-natsort-7.1.1.tgz
NetBSD 9.0mips64ebpy36-natsort-7.0.1.tgz
NetBSD 9.0mips64ebpy37-natsort-7.0.1.tgz
NetBSD 9.0mips64ebpy38-natsort-7.0.1.tgz
NetBSD 9.0mips64ebpy36-natsort-7.1.0.tgz
NetBSD 9.0mips64ebpy37-natsort-7.1.0.tgz
NetBSD 9.0mips64ebpy38-natsort-7.1.0.tgz
NetBSD 9.0mips64ebpy39-natsort-7.1.0.tgz
NetBSD 9.0mips64ebpy36-natsort-7.1.1.tgz
NetBSD 9.0mips64ebpy37-natsort-7.1.1.tgz
NetBSD 9.0mips64ebpy38-natsort-7.1.1.tgz
NetBSD 9.0mips64ebpy39-natsort-7.1.1.tgz
NetBSD 9.0mips64ebpy36-natsort-7.1.1.tgz
NetBSD 9.0mips64ebpy37-natsort-7.1.1.tgz
NetBSD 9.0mips64ebpy38-natsort-7.1.1.tgz
NetBSD 9.0mips64ebpy39-natsort-7.1.1.tgz
NetBSD 9.0powerpcpy36-natsort-7.1.1.tgz
NetBSD 9.0powerpcpy37-natsort-7.1.1.tgz
NetBSD 9.0powerpcpy38-natsort-7.1.1.tgz
NetBSD 9.0powerpcpy39-natsort-7.1.1.tgz
NetBSD 9.0powerpcpy36-natsort-7.1.1.tgz
NetBSD 9.0powerpcpy37-natsort-7.1.1.tgz
NetBSD 9.0powerpcpy38-natsort-7.1.1.tgz
NetBSD 9.0powerpcpy39-natsort-7.1.1.tgz
NetBSD 9.0powerpcpy36-natsort-7.1.1.tgz
NetBSD 9.0powerpcpy37-natsort-7.1.1.tgz
NetBSD 9.0powerpcpy38-natsort-7.1.1.tgz
NetBSD 9.0powerpcpy39-natsort-7.1.1.tgz
NetBSD 9.0powerpcpy36-natsort-7.1.1.tgz
NetBSD 9.0powerpcpy37-natsort-7.1.1.tgz
NetBSD 9.0powerpcpy38-natsort-7.1.1.tgz
NetBSD 9.0powerpcpy39-natsort-7.1.1.tgz
NetBSD 9.0sparc64py36-natsort-7.1.1.tgz
NetBSD 9.0sparc64py37-natsort-7.1.1.tgz
NetBSD 9.0sparc64py38-natsort-7.1.1.tgz
NetBSD 9.0sparc64py39-natsort-7.1.1.tgz
NetBSD 9.0sparc64py36-natsort-7.1.1.tgz
NetBSD 9.0sparc64py37-natsort-7.1.1.tgz
NetBSD 9.0sparc64py38-natsort-7.1.1.tgz
NetBSD 9.0sparc64py39-natsort-7.1.1.tgz
NetBSD 9.0sparc64py36-natsort-7.1.1.tgz
NetBSD 9.0sparc64py37-natsort-7.1.1.tgz
NetBSD 9.0sparc64py38-natsort-7.1.1.tgz
NetBSD 9.0sparc64py39-natsort-7.1.1.tgz
NetBSD 9.0sparcpy36-natsort-7.1.1.tgz
NetBSD 9.0sparcpy37-natsort-7.1.1.tgz
NetBSD 9.0sparcpy38-natsort-7.1.1.tgz
NetBSD 9.0sparcpy39-natsort-7.1.1.tgz
NetBSD 9.0sparcpy36-natsort-7.0.1.tgz
NetBSD 9.0sparcpy37-natsort-7.0.1.tgz
NetBSD 9.0sparcpy38-natsort-7.0.1.tgz
NetBSD 9.0sparcpy36-natsort-7.1.1.tgz
NetBSD 9.0sparcpy37-natsort-7.1.1.tgz
NetBSD 9.0sparcpy38-natsort-7.1.1.tgz
NetBSD 9.0sparcpy39-natsort-7.1.1.tgz
NetBSD 9.0sparcpy36-natsort-7.1.1.tgz
NetBSD 9.0sparcpy37-natsort-7.1.1.tgz
NetBSD 9.0sparcpy38-natsort-7.1.1.tgz
NetBSD 9.0sparcpy39-natsort-7.1.1.tgz
NetBSD 9.0x86_64py36-natsort-7.1.1.tgz
NetBSD 9.0x86_64py37-natsort-7.1.1.tgz
NetBSD 9.0x86_64py38-natsort-7.1.1.tgz
NetBSD 9.0x86_64py39-natsort-7.1.1.tgz
NetBSD 9.0x86_64py36-natsort-7.1.1.tgz
NetBSD 9.0x86_64py37-natsort-7.1.1.tgz
NetBSD 9.0x86_64py38-natsort-7.1.1.tgz
NetBSD 9.0x86_64py39-natsort-7.1.1.tgz
NetBSD 9.0x86_64py36-natsort-7.1.1.tgz
NetBSD 9.0x86_64py37-natsort-7.1.1.tgz
NetBSD 9.0x86_64py38-natsort-7.1.1.tgz
NetBSD 9.0x86_64py39-natsort-7.1.1.tgz
NetBSD 9.0x86_64py36-natsort-7.1.1.tgz
NetBSD 9.0x86_64py37-natsort-7.1.1.tgz
NetBSD 9.0x86_64py38-natsort-7.1.1.tgz
NetBSD 9.0x86_64py39-natsort-7.1.1.tgz
NetBSD 9.0x86_64py36-natsort-7.1.1.tgz
NetBSD 9.0x86_64py37-natsort-7.1.1.tgz
NetBSD 9.0x86_64py38-natsort-7.1.1.tgz
NetBSD 9.0x86_64py39-natsort-7.1.1.tgz

Binary packages can be installed with the high-level tool pkgin (which can be installed with pkg_add) or pkg_add(1) (installed by default). The NetBSD packages collection is also designed to permit easy installation from source.

Available build options

(none)

Known vulnerabilities

The pkg_admin audit command locates any installed package which has been mentioned in security advisories as having vulnerabilities.

Please note the vulnerabilities database might not be fully accurate, and not every bug is exploitable with every configuration.


Problem reports, updates or suggestions for this package should be reported with send-pr.