Asynchronous Python wrapper for (
,
,
)
A simple API for predicting the age, gender, and country of a person by their name.
The API is free for up to 1000 names/day. No sign up or API key needed. So go ahead and try it out.
Instalation
pip install agify
Usage example:
async version:
from agify import AsyncNameAPI
g = AsyncNameAPI(["Igor", "Alex"], mode="*")
print(asyncio.run(g.get_names_info()))
# ->
{'Alex': {'age': 45,
'count': 1114390,
'country': [{'country_id': 'CZ', 'probability': 0.082},
{'country_id': 'UA', 'probability': 0.045},
{'country_id': 'RO', 'probability': 0.033},
{'country_id': 'RU', 'probability': 0.031},
{'country_id': 'IL', 'probability': 0.028}],
'gender': 'male',
'probability': 0.96},
'Igor': {'age': 49,
'count': 168019,
'country': [{'country_id': 'UA', 'probability': 0.169},
{'country_id': 'RS', 'probability': 0.113},
{'country_id': 'RU', 'probability': 0.093},
{'country_id': 'HR', 'probability': 0.084},
{'country_id': 'SK', 'probability': 0.062}],
'gender': 'male',
'probability': 1.0}}
a = AsyncNameAPI(["Ivan"], "gender")
print(asyncio.run(a.get_names_info()))
# ->
{'Ivan': {'count': 425630, 'gender': 'male', 'probability': 1.0}}
a = AsyncNameAPI()
print(asyncio.run(a.get_limit_remaining()))
# ->
987
usual version:
from agify import NameAPI
g = NameAPI(["Igor", "Alex"], mode="*")
print(g.get_names_info())
# ->
{'Alex': {'age': 45,
'count': 1114390,
'country': [{'country_id': 'CZ', 'probability': 0.082},
{'country_id': 'UA', 'probability': 0.045},
{'country_id': 'RO', 'probability': 0.033},
{'country_id': 'RU', 'probability': 0.031},
{'country_id': 'IL', 'probability': 0.028}],
'gender': 'male',
'probability': 0.96},
'Igor': {'age': 49,
'count': 168019,
'country': [{'country_id': 'UA', 'probability': 0.169},
{'country_id': 'RS', 'probability': 0.113},
{'country_id': 'RU', 'probability': 0.093},
{'country_id': 'HR', 'probability': 0.084},
{'country_id': 'SK', 'probability': 0.062}],
'gender': 'male',
'probability': 1.0}}
a = NameAPI(["Ivan"], "gender")
print(a.get_names_info())
# ->
{'Ivan': {'count': 425630, 'gender': 'male', 'probability': 1.0}}
a = NameAPI()
print(a.get_limit_remaining())
# ->
987
Metadata
Release files for agify 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| agify-0.2.0.tar.gz | 4.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agify-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.3 kB
Release files / agify-0.2.0.tar.gz
| Download URL | agify-0.2.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84652c15e0e85d3b946f346aecdc093560cb43a1bc061499de9b3e1111d4f9b7
|
|
BLAKE2b-256 checksum How to use checksums |
01c19931e461cf824af1394870fb8c98803d0dcec7389308ab57485338c50faa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / agify-0.2.0-py3-none-any.whl
| Download URL | agify-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3930fa17eda578398cf091041aa1f72002c9d106d74460eec2f16bfc24722779
|
|
BLAKE2b-256 checksum How to use checksums |
334dc6c650ff3be11889593e19b266f97cdc0b420807b0bfa11ec816b27e5d4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for agify 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.