Faker Galactic
Custom Faker provider for generating science fiction themed data from popular sci-fi universes
Installation
pip install faker-galactic
Or with uv:
uv add faker-galactic
Quick Start
from faker import Faker
from faker_galactic import SciFiProvider
fake = Faker()
fake.add_provider(SciFiProvider)
# Generate random sci-fi names
print(fake.scifi_first_name()) # "Spock"
print(fake.scifi_name()) # "James Kirk"
# Generate Star Trek specific data
print(fake.scifi_name(universe='startrek')) # "Spock Sulu"
print(fake.starship(universe='startrek')) # "USS Enterprise"
print(fake.scifi_rank(universe='startrek')) # "Captain"
Methods
All methods accept an optional universe parameter. When None (default), data is mixed from all universes. When specified (e.g., 'startrek'), only that universe's data is used.
Name Generation
faker.scifi_first_name(universe: str | None = None) -> str
faker.scifi_first_name_male(universe: str | None = None) -> str
faker.scifi_first_name_female(universe: str | None = None) -> str
faker.scifi_last_name(universe: str | None = None) -> str
faker.scifi_last_name_male(universe: str | None = None) -> str
faker.scifi_last_name_female(universe: str | None = None) -> str
faker.scifi_name(universe: str | None = None) -> str # Full name (first + last)
Military & Organizations
faker.scifi_rank(universe: str | None = None) -> str # "Captain", "Commander", etc.
Starships
faker.starship(universe: str | None = None) -> str # "USS Enterprise"
faker.starship_class(universe: str | None = None) -> str # "Galaxy-class"
faker.starship_registry(
universe: str | None = None,
prefix_only: bool = False, # Return "NCC" only
number_only: bool = False # Return "1701" only
) -> str # Full: "NCC-1701"
Locations & Culture
faker.scifi_location(universe: str | None = None) -> str # "USS Enterprise Recreation Deck"
faker.scifi_language(universe: str | None = None) -> str # "Klingon", "Vulcan", etc.
faker.scifi_quote(universe: str | None = None) -> str # Famous quotes
Canonical Characters
Unlike other methods that generate random combinations, canonical characters return actual characters from the source material with complete profiles. Use when you need realistic, recognizable characters with consistent metadata (e.g., demo data where "Captain Picard commands the Enterprise" makes sense).
faker.scifi_canonical_character(universe: str | None = None) -> CanonicalCharacter
Returns a CanonicalCharacter dataclass with:
first_name: strlast_name: strname: str(property: full name)rank: str | Nonestarship: str | Nonestarship_registry: str | Nonestarship_class: str | Nonelanguage: str | Nonequotes: list[str] | None
Supported Universes
'startrek' - Star Trek (TOS, TNG, DS9, VOY, Discovery)
Data counts:
- 30 male first names, 30 female first names
- 30 male last names, 20 female last names
- 19 ranks (Captain, Commander, Admiral, Ensign, etc.)
- 24 starships (USS Enterprise, USS Voyager, USS Defiant, etc.)
- 4 registry patterns with weights (NCC-####, NCC-#####, NX-#####, NAR-#####)
- 18 starship classes (Galaxy-class, Intrepid-class, Constitution-class, etc.)
- 15 base locations (Starfleet Academy, Deep Space Nine, Earth Spacedock, etc.)
- 20 location details (Recreation Deck, Holodeck, Sickbay, etc.)
- 14 languages (Klingon, Vulcan, Romulan, Cardassian, Bajoran, etc.)
- 20 famous quotes
- 20 canonical characters (Picard, Kirk, Janeway, Spock, Data, etc.)
Contributing
Interested in adding new universes or improving the library? See CONTRIBUTING.md for:
- Development setup
- Code quality standards
- How to add new universes
- Testing guidelines
- Pull request process
Metadata
Release files for faker-galactic 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| faker_galactic-1.0.3.tar.gz | 16.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| faker_galactic-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.3 kB
Release files / faker_galactic-1.0.3.tar.gz
| Download URL | faker_galactic-1.0.3.tar.gz |
|---|---|
| Size | 16.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b1af2c792576230a4aad0e1cf4d5ebfb1d1f7279fd49909fa668aa8e2599c16
|
|
BLAKE2b-256 checksum How to use checksums |
b24d4aa6f2e54a02ef76ce102c3d08439ac4aa440a51eb3e9df35c98130daadc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Release files / faker_galactic-1.0.3-py3-none-any.whl
| Download URL | faker_galactic-1.0.3-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f74deb2bc333937651d9bcd766e33bda13a041cfcb2a6dd9249f7c4e829460dd
|
|
BLAKE2b-256 checksum How to use checksums |
1259a9bf8f5b34ff901931886ce6b4b1e93aa07c65179176865a187766bb95e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Security for faker-galactic 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.