GENDER API PYTHON

أولاً قم بتثبيت مكتبتنا باستخدام composer:

شاهد وثائق العميل الكاملة هنا:

https://github.com/markus-perl/gender-api-client

أولاً قم بتثبيت مكتبتنا باستخدام npm:

شاهد وثائق العميل الكاملة هنا:

https://github.com/markus-perl/gender-api-client-npm

أولاً قم بتثبيت مكتبتنا باستخدام npm:

شاهد وثائق العميل الكاملة هنا:

https://github.com/markus-perl/gender-api-client-npm

أولاً، ثبّت مكتبتنا باستخدام pip:

# Install: pip install gender-api-client
from gender_api import Client

client = Client(api_key="insert your server key here")

# Simple gender lookup
result = client.get_by_first_name("kevin")

if result.result_found:
    print(f"Gender: {result.gender}")  #Gender: male
    print(f"Accuracy: {result.accuracy}%")  #Accuracy: 99%
Python Simple (Without Client Library):
Python 3.*
import json

from urllib.request import urlopen

myKey = "insert your server key here"
url = "https://gender-api.com/get?key=" + myKey + "&name=kevin"
response = urlopen(url)
decoded = response.read().decode('utf-8')
data = json.loads(decoded)
print( "Gender: " + data["gender"]); #Gender: male

شاهد وثائق العميل الكاملة هنا:

https://github.com/markus-perl/gender-api-client-python
https://pypi.org/project/gender-api-client/

محادثة