Skip to main content

Enum provider for the Faker Python package.

Project description

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]

Project details


Release history Release notifications

Download files

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

Files for faker-enum, version 0.0.2
Filename, size & hash File type Python version Upload date
faker_enum-0.0.2-py2.py3-none-any.whl (3.2 kB) View hashes Wheel py2.py3
faker_enum-0.0.2.tar.gz (2.5 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page