Skip to content

should the project/package name be prometheus-client rather than prometheus_client #1092

Description

@calestyo

Hey.

I stumbled over the question what to use when one specifies the Prometheus Client as a dependency= in pyproject.toml?

The actual package build/installation seems to work with both names.

For me the whole Python packaging standard are like big mess ^^... but, if I understand correctly the following possibly means:

The name should be lowercased with all runs of the characters ., -, or _ replaced with a single - character.

that the name should be with hypen.

So maybe that should be changed in pyproject.toml and many other places like e.g.:

and perhaps more in tox.ini and mypy.ini?

Cheers,
Chris.

Activity

  1. ethanschen commented on Mar 1, 2025

    @ethanschen
    Contributor

    As mentioned in Names and normalization:

    This means that the following names are all equivalent:

    • friendly-bard (normalized form)
    • Friendly-Bard
    • FRIENDLY-BARD
    • friendly.bard
    • friendly_bard
    • friendly--bard
    • FrIeNdLy-._.-bArD (a terrible way to write a name, but it is valid)

    Whether the project name is prometheus_client or even PrOmEtHeUs-._.-ClIeNt(a terrible way to write a name, but it is valid), it will be normalized as prometheus-client when built into a pypi package.

  2. calestyo commented on Mar 1, 2025

    @calestyo
    Author

    Yes, but since it's anyway normalised and since the recommendation is to use -, I figured maybe it should be changed for clarity. :-)

  3. csmarchbanks commented on Mar 3, 2025

    @csmarchbanks
    Member

    Yeah, as mentioned they are equivalent. I would be ok with updating pyproject.toml and other locations to use the normalized form if that helps reduce any confusion.

  4. Heisenbrick commented on Sep 30, 2026

    @Heisenbrick

    Hi maintainers! I'd like to work on this issue. I'll update pyproject.toml to use the normalized name = prometheus-client and update the PyPI references in README.md to match. Could you please assign this to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions