Skip to main content

PyPI version

Nicknames

A hand-curated CSV file containing English given names (first names) and their associated nicknames.

For more info on the source and format of the data, see https://github.com/carltonnorthern/nicknames. In case that is useful to you, there are also SQL and typescript bindings there.

Python API

The Python package is available on PyPI from

uv add nicknames

and then you can get to the csv data directly:

from nicknames import name_triplets

# name_triplets() returns a list of a NamedTuples:
print(name_triplets()[:3])
# [NameTriplet(name1='aaron', relationship='has_nickname', name2='erin'), NameTriplet(name1='aaron', relationship='has_nickname', name2='ron'), NameTriplet(name1='aaron', relationship='has_nickname', name2='ronnie')]

Or, we have an NickNamer class which provides several convenience methods:

from nicknames import NickNamer

nn = NickNamer()

# Get the nicknames for a given name as a set of strings
nicks = nn.nicknames_of("Alexander")
assert isinstance(nicks, set)
assert "al" in nicks
assert "alex" in nicks

# Note that the relationship isn't symmetric: al is a nickname for alexander,
# but alexander is not a nickname for al.
assert "alexander" not in nn.nicknames_of("al")

# Capitalization is ignored and leading and trailing whitespace is ignored
assert nn.nicknames_of("alexander") == nn.nicknames_of(" ALEXANDER ")

# Queries that aren't found return an empty set
assert nn.nicknames_of("not a name") == set()

# The other useful thing is to go the other way, nickname to canonical:
# It acts very similarly to nicknames_of.
can = nn.canonicals_of("al")
assert isinstance(can, set)
assert "alexander" in can
assert "alex" in can

assert "al" not in nn.canonicals_of("alexander")

# You can combine these to see if two names are interchangeable:
union = nn.nicknames_of("al") | nn.canonicals_of("al")
are_interchangeable = "alexander" in union

For more advanced usage, such as loading your own data, read the source code.

Metadata

Release files for nicknames 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nicknames 1.0.1
File Size Uploaded
nicknames-1.0.1.tar.gz 17.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nicknames 1.0.1
File Interpreter ABI Platform
nicknames-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 35.4 kB

Release files / nicknames-1.0.1.tar.gz

Download URL nicknames-1.0.1.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0b599c1ebf6844c5a65659d46d024c46e9c2cf66b3046e119107e82a14598e6a
BLAKE2b-256 checksum
How to use checksums
86bab555aee8afcf22fcd463886279d063c48eba71b99a55551cd2a7ca0e3577
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.

Transparency log

Release files / nicknames-1.0.1-py3-none-any.whl

Download URL nicknames-1.0.1-py3-none-any.whl
Size 18.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30608a6a50086bb508e6d5f4fb618ef4f988d5604f73ec1ebcccbc92952f9de9
BLAKE2b-256 checksum
How to use checksums
2155f820209a0a0ab535246a901e53fdadb4fcf562b37712d4d7f45c56ae1dab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page