Skip to main content

PyPI version Downloads PyPI license Maintenance GitHub issues

About

Fng-api is an API for fakenamegenerator.com. It has all of the features and customizability as the website does. You can specify gender, age, country, and nameset. The API will scrape the website and parse the data for you.


Usage

Here's an example script to get you started:

from fng_api import *

identity = getIdentity()
print(identity.name)

This script will generate a generic identity and print the name. You can specify different arguments in getIdentity().

getIdentity(nameset=[])
getIdentity(country=[])
getIdentity(gender=str)
getIdentity(minage=str)
getIdentity(maxage=str)

Country

You must pass a list of all of the countries that you would like the identity to possible have to the country argument. Example: To generate an identity with information for the countries of either the United States or Brazil, you would write this:

identity = getIdentity(country=["us", "br"])

Here is a list of all of the country abbreviations:

  • au - Australia
  • as - Austria
  • bg - Belgium
  • br - Brazil
  • ca - Canada
  • cyen - Cyprus (Anglicized)
  • cygk - Cyprus (Greek)
  • cz - Czech Republic
  • dk - Denmark
  • ee - Estonia
  • fi - Finland
  • fr - France
  • gr - Germany
  • gl - Greenland
  • hu - Hungary
  • is - Iceland
  • it - Italy
  • nl - Netherlands
  • nz - New Zealand
  • no - Norway
  • pl - Poland
  • pt - Portugal
  • sl - Slovenia
  • za - South Africa
  • sp - Spain
  • sw - Sweden
  • sz - Switzerland
  • tn - Tunisia
  • uk - United Kingdom
  • us - United States
  • uy - Uruguay

Nameset

You must pass a list of all of the namesets that you would like the identity to possible have to the nameset argument. Example: To generate an identity with a name from either a Danish nameset or a French nameset, you would write this:

identity = getIdentity(nameset=["dk", "fr"])

Here is a list of all of the nameset abbreviations:

  • us - American
  • ar - Arabic
  • au - Australian
  • br - Brazil
  • celat - Chechen (Latin)
  • ch - Chinese
  • zhtw - Traditional Chinese
  • hr - Croatian
  • cs - Czech
  • dk - Danish
  • nl - Dutch
  • en - England/Wales
  • er - Eritrean
  • fi - Finnish
  • fr - French
  • gr - German
  • gl - Greenland
  • sp - Hispanic
  • hobbit - Hobbit
  • hu - Hungarian
  • is - Icelandic
  • ig - Igbo
  • it - Italian
  • jpja - Japanese
  • tlh - Klingon
  • ninja - Ninja
  • no - Norwegian
  • fa - Persian
  • pl - Polish
  • ru - Russian
  • rucyr - Russian (Cyrillic)
  • gd - Scottish
  • sl - Slovenian
  • sw - Swedish
  • th - Thai
  • vn - Vietnamese

Gender

The gender argument is passed as an integer represented by a string. The integer represents the chance out of 100 that the identity will be a male. So if you wanted the identity to be only a girl, you would set gender equal to 0. If you wanted a 50/50 chance, you would set it to 50. Heres an example of an identity that has a 25% chance to be a male and a 75% chance to be a female:

identity = getIdentity(gender="25")

Age Ranges

You can configure the age range of the identity. All you have to do is set the minage and maxage values. Minage cannot be below 0 and maxage cannot be above 100. Minage is also not allowed to be greater than maxage. Here's an example of an identity with the an age range of 15-26:

identity = getIdentity(minage="15", maxage="26")

Default Values

Here are the default values for the getIdentity() function;

getIdentity(nameset=["us"], country=["us"], gender="50", minage="19", maxage="85")

Attributes

You can access an attribute of the identity by doing identity.attribute. So here's how to get the address of an identity as an example:

identity = getIdentity()
print(identity.address)

Here's a list of all al the attributes:

  • address
  • street
  • city
  • state
  • zip
  • motherMaidenName
  • ssn
  • coords
  • phone
  • countryCode
  • birthday
  • birthdayMonth
  • birthdayDay
  • birthdayYear
  • age
  • zodiac
  • email
  • username
  • password
  • website
  • useragent
  • card
  • expiration
  • cvv2
  • company
  • occupation
  • height
  • heightcm
  • weight
  • weightkg
  • blood
  • ups
  • westernunion
  • moneygram
  • color
  • vehicle
  • guid

Release files for fng-api 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fng-api 0.0.5
File Size Uploaded
fng_api-0.0.5.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fng-api 0.0.5
File Interpreter ABI Platform
fng_api-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 11.9 kB

Release files / fng_api-0.0.5.tar.gz

Download URL fng_api-0.0.5.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
872383d6bfb45c74dcb0c662d8aa6d96575ed0b824648c698535b5c012a4e8d3
BLAKE2b-256 checksum
How to use checksums
130f5161a1e465deeaf0bac41296a5e7f2008b7969279499707624de9a5701e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release files / fng_api-0.0.5-py3-none-any.whl

Download URL fng_api-0.0.5-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9a1f167ea8082689c4bf204c61d58bb14ceecaf941596cf4e1a3ea2bde3624a
BLAKE2b-256 checksum
How to use checksums
dca54302769aac814f658f7647dc8f23f4974d914f4253c5cad1cb3dbf161778
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

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