nationalize
Nim wrapper for the Nationalize.io API
Wraps a native library — check OS Compatibility below for platform-specific linking notes.
Summary
| Latest Version | 0.1.0 |
|---|---|
| License | GPL-3.0-only |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:27 |
Tags
Authors
- Nemuel Wainaina
Installation
nimble install nationalize
choosenim install nationalize
git clone https://github.com/nemuelw/nationalize
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| nationalize | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Dependencies
| Package | Version | Optional |
|---|---|---|
| nim >= | 1.6 | No |
| jsony | - | No |
| results | - | No |
Source
| Repository | https://github.com/nemuelw/nationalize |
|---|---|
| Homepage | https://github.com/nemuelw/nationalize |
| Registry Source | nimble_official |
README
nationalize
Nim wrapper for the Nationalize.io API
Installation
nimble install nationalize
Usage
Import the package
import nationalize
Initialize a client
let client = newNationalizeClient("OPTIONAL_API_KEY")
Predict the nationality of a single name
let nationalityResult = client.predictNationality("Nemuel")
if isOk(nationalityResult):
echo nationalityResult.value.country
else: echo nationalityResult.error
Predict the nationalities of multiple names
let nationalitiesResult = client.predictNationalities(@["Nemuel", "Kira"])
if isOk(nationalitiesResult):
for result in nationalitiesResult.value:
echo result.country
else: echo nationalitiesResult.error
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.