Skip to main content

Library to obtain names of Spanish men and women as well as surnames

Project description

Random Spanish Information

What is that?

This library is my first library created for Python (so sorry if there are any bugs). With this library you will be able to obtain both names (for men and women) and Spanish surnames

How can I install it?

Just install with: pip install lap-random-spanish or pip3 install lap-random-spanish

How can I use it?

You've got two ways:

Download the CSVs locally (Recommended)

I recommend you download and import the csv file locally, otherwise the library will load the CSV from my online hosting, which can slow down the speed of your program. Just download the CSV here:

Then, import files to your project and pass it in the third parameter of each function (files' parameter)

mens_csv = "./path/to/your/mans.csv"
surnames_csv = "./path/to/your/surnames.csv"

print(getRandomMaleName(2, True, ["men.csv", "apellidos.csv"])) # Return an array with two full names

Use it without download CSV (Unrecommended)

If you prefer, you can ignore the third parameter and then the library will load the CSV from my online hosting and then continue working.

print(getRandomMaleName(2, True)) # Return an array with two full names

Documentation

In this library you've got three functions

Get random male name

getRandomMaleName expects three optional parameters:

  • First one expects a integer with the number of the names you need. Default is 1
    • If you pass 1, function will return a string. Otherwise, It'll return an array of strings
  • Second one expects a boolean to return a full name or not. Default is False
    • If you pass True, function will return a full name with name and surname. Otherwise It'll return just the name
  • Third one expects a array string with the path to the CSV. Default is my website host.
    • See the Download the CSVs locally (Recommended) point for more info

Get random female name

getRandomFemaleName expects three optional parameters:

  • First one expects a integer with the number of the names you need. Default is 1
    • If you pass 1, function will return a string. Otherwise, It'll return an array of strings
  • Second one expects a boolean to return a full name or not. Default is False
    • If you pass True, function will return a full name with name and surname. Otherwise It'll return just the name
  • Third one expects a array string with the path to the CSV. Default is my website host.
    • See the Download the CSVs locally (Recommended) point for more info

Get random surname

getRandomSurname expects three optional parameters:

  • First one expects a integer with the number of the surnames you need. Default is 1
    • If you pass 1, function will return a string. Otherwise, It'll return an array of strings
  • Second one expects a boolean to return a pair of surnames or not. Default is False
    • If you pass True, function will return a pairs of surnames as in Spain everybody got two surnames. Otherwise It'll return just one surname
  • Third one expects a array string with the path to the CSV. Default is my website host.
    • See the Download the CSVs locally (Recommended) point for more info

Last test was done in Python 3.9.7

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lap_random_spanish-1.6.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lap_random_spanish-1.6-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file lap_random_spanish-1.6.tar.gz.

File metadata

  • Download URL: lap_random_spanish-1.6.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for lap_random_spanish-1.6.tar.gz
Algorithm Hash digest
SHA256 cbd00246f8fbc96a4f11437d22dd364d9ccc3df6de584fc9ddfb787fa9b3204b
MD5 033c61f7deaf5ebb4a28afe40cfe9d1d
BLAKE2b-256 8c0b44aad5016c97bf1d108dc06af3f10646a1663d38b449509ccef82689da0c

See more details on using hashes here.

File details

Details for the file lap_random_spanish-1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for lap_random_spanish-1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 620552958bd7325b67d645180ef4d1fffde927a61328fefbc2c59c28891756e0
MD5 6f879f8e00ef2bbfb28bb5c636fb94b7
BLAKE2b-256 5579eda49177675cb47af9bfa871078d2c267105be963686c6ac8326bfe049c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page