A random name generation script.
Project description
A Python package for building names by using other names as building blocks.
Why?
It started with an update to a blackjack game I wrote as my first project in Python. I wanted to have a bunch of computer players playing with you, and thought they should be randomly generated with randomly generated names. Then it came up in a few other things I wrote, so I figured I’d turn it into a package.
What does it do?
It pulls random names from a database, and can modify those names before returning them. Major features include:
Use parts of multiple names to construct a new name.
Modify the selected or constructed names.
Use a default database of names.
Use your own database of names.
Import into your Python code as a package.
Use from the command line.
How do I run it?
The easiest way to install and run mkname is:
Ensure you are using Python 3.10 or higher.
Install from PyPI using pip: pip install mkname
Run the following command to see the options: mkname -h
It should also be able to be imported into your Python code as a package.
What Changed in Version 0.2.3
The following changes were made in v0.2.3:
(To-Do) Fixed automatic creation of database connections.
How do I run the tests?
I’m using the pytest library for the unit tests. To just run those tests, go to the root of your clone of the mkname repository and use the following command:
python3 -m pytest
The full suite of style checks, mypy, and such I use can be run using a shortcut I have set up in the Makefile:
make pre
Note: precommit.py requires itself to be run from a virtual environment located in the .venv directory at the root of the repository. This is so I don’t accidentally run it using my system’s Python and then waste hours troubleshooting that mess. If you want to disable this, you’ll have to modify the script. The easiest way is probably commenting out the check_venv() call in main().
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mkname-0.2.3.tar.gz
.
File metadata
- Download URL: mkname-0.2.3.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5019744474646788fb77a959e8ffd9f08c9554f284de08d5454c9c305cec7541 |
|
MD5 | 42ff1381b6a0667e6b01d3e80f22198c |
|
BLAKE2b-256 | 31e4b8fe5173a0e53495dc6f528ad1e04b2025409d85f705ff614e0e9dc65148 |
File details
Details for the file mkname-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: mkname-0.2.3-py3-none-any.whl
- Upload date:
- Size: 25.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99269208c4924a750e1d8088aacc8a771be0c1794e4c6383e2b4fd775ceda8f5 |
|
MD5 | 4cb6ef5a57d563286424014030881e63 |
|
BLAKE2b-256 | 672c85a089909800246439ea8c42c7855a714238b0abc7c956b6737e69aa1af2 |