skillfed

faker-enum

Enum provider for the Faker Python package.

faker-enum v0.0.2 278.9K downloads/30d#8,130 on PyPI6
Permissive license MIT License Abandoned released

What it is and what it does

faker_enum is a provider plugin for Faker that extends it to generate random enum values. It works by registering an EnumProvider with a Faker instance, then calling a method to pick a random member from any Python enum class you define. This is useful in test suites where you need to populate enum-typed fields with varied test data.

The package depends only on faker and has no other runtime dependencies, keeping installation simple. However, it has been abandoned since its initial release on 2018-10-26 and carries Alpha status, meaning compatibility with modern versions of Faker or current Python releases is uncertain.

Use it for:

  • Generate random enum values in unit tests without manually specifying all possible choices.
  • Populate test fixtures with varied enum-typed fields for data-driven testing.
  • Create synthetic test data for APIs or databases that accept enum parameters.
  • Mock enum selections in property-based tests using Faker's randomization.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Adds enum value generation to the Faker library, allowing you to randomly select from Python enum members during test data generation.

No. The package is abandoned (last commit 2018-10-26) and carries Alpha status. While it has no known vulnerabilities and low install friction, the lack of maintenance means it is likely incompatible with modern Faker and Python versions. For current projects, consider using Faker's built-in randomization or a maintained alternative.

Install

faker-enum on PyPI

pip

pip install faker-enum

uv

uv add faker-enum

poetry

poetry add faker-enum

Installing faker-enum

Before you install

Installation is straightforward with low friction. However, the package is abandoned—last updated 2018-10-26 with no commits since, and carries Alpha status.

License in practice

MIT License permits free use, modification, and distribution with minimal restrictions.

Quickstart

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)

Requires Faker to be installed; compatibility with current Faker versions is uncertain given the package's abandoned status.

Verify before relying

  • Compatibility with current Faker API versions and modern Python releases is unknown.
  • Whether the package still functions as intended with recent faker library updates is unconfirmed.

Package facts

License MIT License (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — faker
Maintenance abandoned — 2,849 days since the last release
Last repo commit
First released
Downloads 278,870/month — #8,130 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: faker_enum-0.0.2-py2.py3-none-any.whl

Keywords: faker, enum, test, data

Development Status :: 3 - AlphaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: TestingTopic :: Utilities

Tags

faker enum providergenerate random enum valuesfaker test data enumpython enum fakerrandom enum selection testingfaker provider enum
faker-plugintest-data-generationabandoned

More Python Modules packages