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.

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

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page