Skip to main content

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 random-spanish or pip3 install random-spanish

How can I use it?

You've got two ways:

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

Metadata

Release files for random-spanish 1.2

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

Source distribution (sdist)

Source distribution for random-spanish 1.2
File Size Uploaded
random_spanish-1.2.tar.gz 1.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for random-spanish 1.2
File Interpreter ABI Platform
random_spanish-1.2-py3-none-any.whl Python 3 none any Details

Total release size: 3.9 kB

Release files / random_spanish-1.2.tar.gz

Download URL random_spanish-1.2.tar.gz
Size 1.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d7bc357f8b68a7b632e41f80ddeff9606014586cb36f332097a90e7764befafa
BLAKE2b-256 checksum
How to use checksums
ea9b7bf761e95de2dc3fa0ab067acd341bc6f6cf36682200814e3352207d1665
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.7

Release files / random_spanish-1.2-py3-none-any.whl

Download URL random_spanish-1.2-py3-none-any.whl
Size 2.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4b18175c3e30d44ed97416759996369d673a56b3734b34e60feee86efbe274c
BLAKE2b-256 checksum
How to use checksums
bbe877252712a9d2d93b2c8a8753152374dde5e99e1abe4e01d2b23d2d94f5b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.7

Release history Release notifications | RSS feed

This release

1.2 This release

2 release files

1.1

2 release files

1.0.1

2 release files

1.0

2 release files

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