Skip to content

Conversation

Fernandavazgit1
Copy link

What does this change

This PR adds a new method called latam_plate() to the automotive provider for generating vehicle license plates from different Latin American countries.

Supported formats:

  • 🇧🇷 Brazil: ABC-1234
  • 🇦🇷 Argentina: AB 123 CD
  • 🇨🇱 Chile: AB-CD-12

The method allows the developer to specify a country using the pais parameter (default: random choice). This is useful for testing systems involving vehicle registration, logistics, transportation apps, etc.

What was wrong

Currently, Faker does not support license plate formats specific to Latin American countries. Developers working on apps for this region need custom generators to simulate realistic vehicle data for Brazil, Argentina, Chile, and others.

How this fixes it

This adds a custom method latam_plate() which generates localized plate formats depending on the selected country. It uses internal logic for formatting and random generation based on common standards in those regions.

Fixes #12345

Checklist

  • I have read the documentation about CONTRIBUTING
  • I have read the documentation about Coding style
  • I have run make lint and make test
  • I have added unit tests in test_plate.py
  • I have documented the new method

import string

class Provider(BaseProvider):
def passport_number(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you push the right code? Looks like this is generating a passport number, not a Latin American license plate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants