Skip to main content

qng

PyPI

Documentation aussi disponible en français

qng, the Queb name generator.

Requirements

To run qng, you will only need Python ≥ 3.4.

For installing, we recommend using the pip package manager.

Installing

To install qng system-wide, run:

sudo pip3 install qng

To install qng manually from source, the steps are as follows:

git clone git@github.com:abusque/qng.git
cd qng
sudo ./setup.py install

Using

Once installed, you can use qng by running the following command:

qng

This will generate a single random Queb name.

You can also generate names for a specific gender:

qng --gender male

Generate only part of a name:

qng --part first

Generate names according to their relative popularity:

qng --weighted

Generate a name formatted as “snake_case” without any diacritics (useful for naming your containers):

qng --snake-case

Here’s how you could use this to name a Docker container:

docker run --name $(qng --snake-case) hello-world

All the above options may be combined if desired. Refer to the help for more details:

qng --help

Python API

You can also use qng through its Python API, for integration with other applications.

Here is a simple example of programmatic usage:

import qng.generator

generator = qng.generator.QuebNameGenerator()
name = generator.generate()
print(name)

The generate() function also supports the following options, with the same meaning as the corresponding CLI options:

import qng.generator

generator = qng.generator.QuebNameGenerator()
name = generator.generate(
    gender='male',
    part='first',
    snake_case=True,
    weighted=True,
)
print(name)

Refer to the documentation in the source file for more details.

Development

For local development of qng, you may use pipenv. Use pipenv install --dev to generate a virtual environment into which the dependencies will be installed. You may then use pipenv shell to activate that environment.

For publishing releases to PyPI, we recommend using Twine.

References

The data for qng was sourced from l’institut de la statistique for surnames, and from PrénomsQuébec.ca for first names (who in turn get their data from Retraite Québec’s banque de prénoms).

Scripts used for scraping the data from the web pages can be found under the scripts/ directory.

Metadata

Release files for qng 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 qng 1.0.1
File Size Uploaded Provenance
qng-1.0.1.tar.gz 17.7 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 35.5 kB

Release files / qng-1.0.1.tar.gz

Download URL qng-1.0.1.tar.gz
Size 17.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ab26de79ed29f260e53b795b4e29fdca53d1bfcf7a6464d6396954c751a9e030
BLAKE2b-256 checksum
How to use checksums
b712ebc61e5de576c2e227139086d6a49a9a5ba989cbccb27bdc53a3b5735764
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL qng-1.0.1-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b390c419361fd9ecb4c3a0c67ae35a3181fc3fe4057ea676543eb6a2d34806e4
BLAKE2b-256 checksum
How to use checksums
7bb16466e93741301ebb7c64857a2c30ad1f353b86178f12bb133168e7fc78b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for qng 1.0.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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