No description
Find a file
2025-07-09 21:47:45 +03:00
src Initial commit 2025-07-09 21:45:23 +03:00
.gitignore Initial commit 2025-07-09 21:45:23 +03:00
genderize.nimble Initial commit 2025-07-09 21:45:23 +03:00
LICENSE Create LICENSE 2025-07-09 21:47:45 +03:00
README.md Initial commit 2025-07-09 21:45:23 +03:00

genderize

Nim wrapper for the Genderize.io API

Installation

nimble install genderize

Usage

Import the package

import genderize

Initialize a client

let client = newGenderizeClient("OPTIONAL_API_KEY")

Predict the gender of a single name

let genderResult = client.predictGender("Nemuel")
if isOk(genderResult):
  echo genderResult.value.gender
else: echo genderResult.error

Predict the genders of multiple names

let gendersResult = client.predictGenders(@["Nemuel", "Kira"])
if isOk(gendersResult):
  for result in gendersResult.value:
    echo result.gender
else: echo gendersResult.error

Both the predictGender and predictGenders methods have an optional second parameter (a 2-letter country ID e.g. KE)

Contributing

Contributions are welcome! Feel free to create an issue or open a pull request.

License

This project is licensed under the terms of the GNU GPL v3.0 License.