Registry / testing / faker-edu

faker-edu

JSON →
library1.1.0pypypi✓ verified 91d ago

Faker-Edu is a provider for the Faker library, extending its capabilities to generate fake information related to educational institutions and academics. It's currently at version 1.1.0 and has a moderate release cadence, focusing on adding new generators. It's designed to be used in conjunction with the main Faker library for data generation in testing and development.

pip install faker-edu
INSTALL
IMPORT
SIG · FAKER-EDU
F
faker-edu
testingpythonv1.1.0
Install
2.9s avg
Import
271ms
Disk
40MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
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
musl
py 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.279s · 42.4MB
glibc
py 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()}")
Debug
Known issues
gotchaAfter installing 'faker-edu', you must explicitly add its 'Provider' class to your Faker instance using `fake.add_provider()`.
fix
Always include `fake.add_provider(EduProvider)` after initializing `Faker()` and importing `EduProvider`.
affects: 1.0.0+
gotchaEnsure you have the base 'faker' library installed. 'faker-edu' is a provider and depends on 'faker' to function.
fix
Run `pip install faker` if you haven't already, in addition to `pip install faker-edu`.
affects: 1.0.0+
Errors
Common errors & fixes
AttributeError: 'Generator' object has no attribute 'high_school'
The faker-edu provider has not been added to the Faker instance.
fix
Add 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.
fix
Install the package: `pip install faker-edu`.
ModuleNotFoundError: No module named 'faker'
The base `faker` library, which `faker-edu` depends on, is not installed.
fix
Install 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.
Agent activity
10 hits · last 30 days
node
10
Resources
faker-edu — pip install faker-edu · libregistry