Skip to content

NazarioJL/faker_enum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Faker Enum

Build status of the master branch MIT License Code style: Black

faker_enum is a provider for the Faker Python package.

Summary

Faker enum provides the ability to generate enum values based on an enum type.

Usage

from enum import Enum

from faker import Faker
from faker_enum import EnumProvider

fake = Faker()
fake.add_provider(EnumProvider)

class Color(Enum):
    RED = 1
    GREEN = 2
    BLUE = 3

fake.enum(Color)
# One of [Color.RED, Color.GREEN, Color.BLUE]

About

Enum provider for Faker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published