You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
BBaoVanC ff93da5fe6
Update README.md to say tested on latest TWO python versions
9 months ago
liblistloader Change reference of GitHub repository to my Gitea 9 months ago
.drone.yml Migrate from GitHub Actions to Drone CI/CD 9 months ago
.gitignore Add env/ to .gitignore 9 months ago
LICENSE Initial commit 1 year ago
README.md Update README.md to say tested on latest TWO python versions 9 months ago
setup.py Bump version in setup.py to v1.0.1.post1 9 months ago

README.md

liblistloader

Build Status

PyPI PyPI - License

Library for loading word lists from files. Built for libnamegen

Features

  • Easy to use
  • Imported as module
  • Always tested before release
  • Officially supports latest two versions of Python 3

Included word lists


How to Install

Run the command pip install liblistloader. If you want to specify a specific Python version to use for pip, use a command such as pip3 or pip3.8.


Documentation

API

To import a single list, type import liblistloader.[word list]. Then, you can get a list, each item being a word in the word list, by typing liblistloader.[word list].words.

WARNING! These lists are VERY long! For example, desiquintans_nounlist is 6,801 words long! Therefore, liblistloader.desiquintans_nounlist.words returns a list with 6,801 items in it. I would not recommend the following code for your sanity:

import liblistloader.desiquintans_nounlist

for word in liblistloader.desiquintans_nounlist.words:
    print(word)

Output (total 6,801 lines):

ATM
CD
SUV
TV
aardvark
abacus
abbey
abbreviation
abdomen
...

Import all noun lists and pick a random word from a few:

import random
import liblistloader

print("desiquintans_nounlist: " + random.choice(liblistloader.desiquintans_nounlist.words))

Output (will vary because a random word is being picked):

desiquintans_nounlist: velocity

License

liblistloader is licensed under the GPLv3 license. For more information, please refer to LICENSE.