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


Download files

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

Source Distribution

faker_enum-0.0.2.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

faker_enum-0.0.2-py2.py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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