Registry / testing / faker-nonprofit

faker-nonprofit

JSON →
library1.0.0pypypi✓ verified 85d ago

Faker-nonprofit is a provider for the Faker library, extending its capabilities to generate fake nonprofit-specific data such as organization names, EINs, and other related information. It is currently at version 1.0.0 and has a flexible release cadence, typically releasing new versions as features or bug fixes are introduced.

pip install faker-nonprofit
INSTALL
IMPORT
SIG · FAKER-NONPROFIT
F
faker-nonprofit
testingpythonv1.0.0
Install
2.9s avg
Import
Disk
40MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.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.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 42.4MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.9s · import 0.000s · 43MB
40MB installed
● package 40MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Provider
from faker_nonprofit import Provider
from faker_nonprofit.provider import NonprofitProvider

This quickstart demonstrates how to import the NonprofitProvider, register it with the Faker instance, and then generate various pieces of fake nonprofit data.

from faker import Faker from faker_nonprofit.provider import NonprofitProvider # Register the custom provider with Faker Faker.add_provider(NonprofitProvider) # Initialize Faker fake = Faker() # Generate fake nonprofit data print(f"Nonprofit Name: {fake.nonprofit_name()}") print(f"Nonprofit EIN: {fake.nonprofit_ein()}") print(f"Nonprofit Street Address: {fake.nonprofit_street_address()}") print(f"Nonprofit City: {fake.nonprofit_city()}") print(f"Nonprofit State: {fake.nonprofit_state_abbr()}") print(f"Nonprofit Zip Code: {fake.nonprofit_zip_code()}")
Debug
Known issues
gotchaForgetting to register the provider with Faker. Faker custom providers must be explicitly added to the Faker instance or the Faker class itself before their methods can be called.
fix
Always use `Faker.add_provider(NonprofitProvider)` or `fake = Faker(); fake.add_provider(NonprofitProvider)` before attempting to use the provider's methods.
affects: 1.0.0+
gotchaIncorrect import path for NonprofitProvider. The provider class is not directly accessible from the top-level `faker_nonprofit` package.
fix
Import `NonprofitProvider` specifically from `faker_nonprofit.provider`: `from faker_nonprofit.provider import NonprofitProvider`.
affects: 1.0.0+
gotchaThe available data fields are limited to those defined in the NonprofitProvider. Attempting to access non-existent attributes will result in an AttributeError.
fix
Consult the library's documentation or source code for a list of all available methods (e.g., `nonprofit_name`, `nonprofit_ein`, `nonprofit_city`).
affects: 1.0.0+
Upgrade
Version history
1.0.0latest on PyPI · released Dec 1, 2021
Audit
Dependencies
fakerrequiredThis library is a provider for Faker and requires it to function.
Agent activity
8 hits · last 30 days
node
8
Resources
faker-nonprofit — pip install faker-nonprofit · libregistry