Install & Compatibility
Where this runs
tested against v1.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.279s · 42.4MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 2.9s · import 0.264s · 43MB
40MB installed
● package 40MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Provider
✓ from faker_edu import Provider as EduProvider
✗ from faker_edu.provider import EduProvider
The main provider class is directly accessible from the top-level package and should be aliased for clarity when added to Faker.
Faker
✓ from faker import Faker
The base Faker class is required to use faker-edu providers.
This quickstart demonstrates how to initialize the Faker library, add the Faker-Edu provider, and then generate various types of educational data such as high school names, college names, academic disciplines, facilities, and sports.
from faker import Faker
from faker_edu import Provider as EduProvider
# Initialize Faker
fake = Faker()
# Add the Faker-Edu provider
fake.add_provider(EduProvider)
# Generate fake educational data
print(f"High School: {fake.high_school()}")
print(f"College: {fake.college()}")
print(f"Academic Discipline: {fake.academic_discipline()}")
print(f"Facility: {fake.facility()}")
print(f"Sport: {fake.sport()}")
Errors
Common errors & fixes
AttributeError: 'Generator' object has no attribute 'high_school'
The faker-edu provider has not been added to the Faker instance.
fixAdd the provider using `fake.add_provider(EduProvider)` after initializing your `Faker` object.
ModuleNotFoundError: No module named 'faker_edu'
The `faker-edu` library is not installed in your current Python environment.
fixInstall the package: `pip install faker-edu`.
ModuleNotFoundError: No module named 'faker'
The base `faker` library, which `faker-edu` depends on, is not installed.
fixInstall the base Faker library: `pip install faker`.
Upgrade
Version history
1.1.0latest on PyPI · released Mar 23, 2024
Audit
Dependencies
fakerrequiredFaker-Edu is a provider for the Faker library and requires it to function.