faker-pet-names 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- faker_pet_names-0.1.0/LICENSE +21 -0
- faker_pet_names-0.1.0/MANIFEST.in +5 -0
- faker_pet_names-0.1.0/NOTICE +12 -0
- faker_pet_names-0.1.0/PKG-INFO +99 -0
- faker_pet_names-0.1.0/README.md +70 -0
- faker_pet_names-0.1.0/docs/data-policy.md +36 -0
- faker_pet_names-0.1.0/docs/releasing.md +17 -0
- faker_pet_names-0.1.0/pyproject.toml +49 -0
- faker_pet_names-0.1.0/setup.cfg +4 -0
- faker_pet_names-0.1.0/src/faker_pet_names/__init__.py +31 -0
- faker_pet_names-0.1.0/src/faker_pet_names/data/names.json +14214 -0
- faker_pet_names-0.1.0/src/faker_pet_names/data/provenance.json +18 -0
- faker_pet_names-0.1.0/src/faker_pet_names/data/statistics.json +21 -0
- faker_pet_names-0.1.0/src/faker_pet_names.egg-info/PKG-INFO +99 -0
- faker_pet_names-0.1.0/src/faker_pet_names.egg-info/SOURCES.txt +19 -0
- faker_pet_names-0.1.0/src/faker_pet_names.egg-info/dependency_links.txt +1 -0
- faker_pet_names-0.1.0/src/faker_pet_names.egg-info/requires.txt +9 -0
- faker_pet_names-0.1.0/src/faker_pet_names.egg-info/top_level.txt +1 -0
- faker_pet_names-0.1.0/tests/test_data_policy.py +44 -0
- faker_pet_names-0.1.0/tests/test_provider.py +92 -0
- faker_pet_names-0.1.0/tools/build_data.py +102 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 copyleftdev
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
faker-pet-names code is licensed under the MIT License.
|
|
2
|
+
|
|
3
|
+
The pet-name data derives from the City of Seattle's Seattle Pet Licenses
|
|
4
|
+
open-data dataset (jguv-t9rb), retrieved 2026-12-02. The publisher designates
|
|
5
|
+
that dataset PUBLIC_DOMAIN. No exclusive rights are claimed over source data.
|
|
6
|
+
https://data.seattle.gov/City-Administration/Seattle-Pet-Licenses/jguv-t9rb
|
|
7
|
+
https://data.seattle.gov/api/views/jguv-t9rb.json
|
|
8
|
+
|
|
9
|
+
Only name/species frequency aggregates were fetched. License numbers, ZIP
|
|
10
|
+
codes and owner identities were not collected. The data were normalized,
|
|
11
|
+
deduplicated and screened before distribution; see data/provenance.json
|
|
12
|
+
and docs/data-policy.md. Neither Seattle nor Faker endorses this package.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: faker-pet-names
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Seeded dog and cat names for Faker from a screened public-domain Seattle dataset
|
|
5
|
+
Author: copyleftdev
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/copyleftdev/faker-pet-names
|
|
8
|
+
Project-URL: Repository, https://github.com/copyleftdev/faker-pet-names
|
|
9
|
+
Project-URL: Issues, https://github.com/copyleftdev/faker-pet-names/issues
|
|
10
|
+
Keywords: faker,pet,dog,cat,test-data
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Topic :: Software Development :: Testing
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
License-File: NOTICE
|
|
20
|
+
Requires-Dist: Faker==40.63.0
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: pytest==9.2.0; extra == "dev"
|
|
23
|
+
Requires-Dist: coverage==7.13.0; extra == "dev"
|
|
24
|
+
Requires-Dist: black==26.10.1; extra == "dev"
|
|
25
|
+
Requires-Dist: better-profanity==0.7.0; extra == "dev"
|
|
26
|
+
Requires-Dist: build==1.6.1; extra == "dev"
|
|
27
|
+
Requires-Dist: twine==7.0.0; extra == "dev"
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
|
|
30
|
+
# faker-pet-names
|
|
31
|
+
|
|
32
|
+
A standalone [Faker](https://faker.readthedocs.io/) community provider for dog and
|
|
33
|
+
cat names, derived from a screened public-domain City of Seattle dataset.
|
|
34
|
+
|
|
35
|
+
## Install and use
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
python -m pip install faker-pet-names
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
from faker import Faker
|
|
43
|
+
|
|
44
|
+
fake = Faker("en_US", includes=["faker_pet_names"], use_weighting=True)
|
|
45
|
+
fake.seed_instance(12012027)
|
|
46
|
+
|
|
47
|
+
fake.pet_name("dog")
|
|
48
|
+
fake.pet_name("cat")
|
|
49
|
+
fake.dog_name()
|
|
50
|
+
fake.cat_name()
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`species` accepts `dog` or `cat`, case-insensitively, and defaults to `dog`.
|
|
54
|
+
Unsupported species raise `ValueError`. Use `includes` so Faker applies its
|
|
55
|
+
weighting configuration when loading the provider. Set `use_weighting=False`
|
|
56
|
+
for equal probability per retained name; otherwise source frequency supplies the
|
|
57
|
+
weights. `add_provider(Provider)` also works, but uses BaseProvider's default
|
|
58
|
+
weighting behavior rather than the Faker factory's requested weighting setting.
|
|
59
|
+
|
|
60
|
+
Names can repeat. Names are not identifiers. Faker's `unique` wrapper is available,
|
|
61
|
+
but the pool is finite and may exhaust. Seed, Faker version, dataset version and
|
|
62
|
+
call order must match to reproduce a sequence. Faker is pinned for this release.
|
|
63
|
+
|
|
64
|
+
## Data and scope
|
|
65
|
+
|
|
66
|
+
The source is Seattle's public-domain pet-license dataset, retrieved 2026-12-02.
|
|
67
|
+
Only name/species frequency aggregates were fetched, covering 38,379 observations.
|
|
68
|
+
No license IDs, ZIP codes, owner names or relationships were collected. Counts and
|
|
69
|
+
hashes of the screened release are included in `data/statistics.json`.
|
|
70
|
+
|
|
71
|
+
Unicode normalization, placeholder rejection, case-insensitive consolidation and
|
|
72
|
+
English content screening run at build-data time. The runtime package contains
|
|
73
|
+
only screened names and metadata, with no network access or telemetry. The original
|
|
74
|
+
unscreened aggregate and the filter's word list are not distributed.
|
|
75
|
+
|
|
76
|
+
Frequencies describe licensed Seattle pets at that snapshot, not global naming
|
|
77
|
+
preferences. Changing Faker's locale does not change this dataset. English
|
|
78
|
+
screening is conservative, excludes ambiguous matches and is not a multilingual
|
|
79
|
+
safety guarantee. Treat generated names as ordinary untrusted text when rendering.
|
|
80
|
+
See [data policy](docs/data-policy.md) and [NOTICE](NOTICE) for attribution.
|
|
81
|
+
|
|
82
|
+
## Development
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
python -m venv .venv
|
|
86
|
+
.venv/bin/python -m pip install -e '.[dev]'
|
|
87
|
+
.venv/bin/python -m coverage run -m pytest
|
|
88
|
+
.venv/bin/python -m coverage report
|
|
89
|
+
.venv/bin/python -m black --check src tests tools
|
|
90
|
+
.venv/bin/python -m build
|
|
91
|
+
.venv/bin/python -m twine check --strict dist/*
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Tests cover seeded replay, instance isolation, species membership, weighting,
|
|
95
|
+
invalid arguments, normalization, frequency accounting and release-data screening.
|
|
96
|
+
CI tests the built wheel on Python 3.10–3.14. See [release checklist](docs/releasing.md).
|
|
97
|
+
|
|
98
|
+
Code: MIT. Source data: public domain, City of Seattle. This project is independent
|
|
99
|
+
of and not endorsed by Faker or the City of Seattle.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# faker-pet-names
|
|
2
|
+
|
|
3
|
+
A standalone [Faker](https://faker.readthedocs.io/) community provider for dog and
|
|
4
|
+
cat names, derived from a screened public-domain City of Seattle dataset.
|
|
5
|
+
|
|
6
|
+
## Install and use
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
python -m pip install faker-pet-names
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
```python
|
|
13
|
+
from faker import Faker
|
|
14
|
+
|
|
15
|
+
fake = Faker("en_US", includes=["faker_pet_names"], use_weighting=True)
|
|
16
|
+
fake.seed_instance(12012027)
|
|
17
|
+
|
|
18
|
+
fake.pet_name("dog")
|
|
19
|
+
fake.pet_name("cat")
|
|
20
|
+
fake.dog_name()
|
|
21
|
+
fake.cat_name()
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`species` accepts `dog` or `cat`, case-insensitively, and defaults to `dog`.
|
|
25
|
+
Unsupported species raise `ValueError`. Use `includes` so Faker applies its
|
|
26
|
+
weighting configuration when loading the provider. Set `use_weighting=False`
|
|
27
|
+
for equal probability per retained name; otherwise source frequency supplies the
|
|
28
|
+
weights. `add_provider(Provider)` also works, but uses BaseProvider's default
|
|
29
|
+
weighting behavior rather than the Faker factory's requested weighting setting.
|
|
30
|
+
|
|
31
|
+
Names can repeat. Names are not identifiers. Faker's `unique` wrapper is available,
|
|
32
|
+
but the pool is finite and may exhaust. Seed, Faker version, dataset version and
|
|
33
|
+
call order must match to reproduce a sequence. Faker is pinned for this release.
|
|
34
|
+
|
|
35
|
+
## Data and scope
|
|
36
|
+
|
|
37
|
+
The source is Seattle's public-domain pet-license dataset, retrieved 2026-12-02.
|
|
38
|
+
Only name/species frequency aggregates were fetched, covering 38,379 observations.
|
|
39
|
+
No license IDs, ZIP codes, owner names or relationships were collected. Counts and
|
|
40
|
+
hashes of the screened release are included in `data/statistics.json`.
|
|
41
|
+
|
|
42
|
+
Unicode normalization, placeholder rejection, case-insensitive consolidation and
|
|
43
|
+
English content screening run at build-data time. The runtime package contains
|
|
44
|
+
only screened names and metadata, with no network access or telemetry. The original
|
|
45
|
+
unscreened aggregate and the filter's word list are not distributed.
|
|
46
|
+
|
|
47
|
+
Frequencies describe licensed Seattle pets at that snapshot, not global naming
|
|
48
|
+
preferences. Changing Faker's locale does not change this dataset. English
|
|
49
|
+
screening is conservative, excludes ambiguous matches and is not a multilingual
|
|
50
|
+
safety guarantee. Treat generated names as ordinary untrusted text when rendering.
|
|
51
|
+
See [data policy](docs/data-policy.md) and [NOTICE](NOTICE) for attribution.
|
|
52
|
+
|
|
53
|
+
## Development
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
python -m venv .venv
|
|
57
|
+
.venv/bin/python -m pip install -e '.[dev]'
|
|
58
|
+
.venv/bin/python -m coverage run -m pytest
|
|
59
|
+
.venv/bin/python -m coverage report
|
|
60
|
+
.venv/bin/python -m black --check src tests tools
|
|
61
|
+
.venv/bin/python -m build
|
|
62
|
+
.venv/bin/python -m twine check --strict dist/*
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Tests cover seeded replay, instance isolation, species membership, weighting,
|
|
66
|
+
invalid arguments, normalization, frequency accounting and release-data screening.
|
|
67
|
+
CI tests the built wheel on Python 3.10–3.14. See [release checklist](docs/releasing.md).
|
|
68
|
+
|
|
69
|
+
Code: MIT. Source data: public domain, City of Seattle. This project is independent
|
|
70
|
+
of and not endorsed by Faker or the City of Seattle.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Data provenance and screening
|
|
2
|
+
|
|
3
|
+
Source: [Seattle Pet Licenses, jguv-t9rb](https://data.seattle.gov/City-Administration/Seattle-Pet-Licenses/jguv-t9rb).
|
|
4
|
+
The metadata API designates the dataset PUBLIC_DOMAIN. Retrieval date: 2026-12-02.
|
|
5
|
+
Exact query, source update epoch and retained fields are in package `data/provenance.json`.
|
|
6
|
+
|
|
7
|
+
The query selects only species, animal name and count, grouping dog/cat records.
|
|
8
|
+
Its limit is 50,000 groups; the retrieved snapshot has 14,433 groups. The raw
|
|
9
|
+
aggregate hash is retained; the unscreened input itself is not redistributed.
|
|
10
|
+
|
|
11
|
+
`tools/build_data.py` applies the following deterministic policy:
|
|
12
|
+
|
|
13
|
+
1. Reject controls, blank/numeric-only labels, missing-value placeholders and
|
|
14
|
+
names longer than 80 characters; normalize NFC and collapse whitespace.
|
|
15
|
+
2. Consolidate case-insensitive names by species, summing frequencies.
|
|
16
|
+
3. Screen every spelling and its accent-folded equivalent with the default
|
|
17
|
+
English list in `better-profanity==0.7.0`. Exclude the whole group if flagged.
|
|
18
|
+
4. Keep the most frequent spelling, with a lexical tie-break; sort alphabetically.
|
|
19
|
+
5. Store only approved labels, counts, summary totals and hashes. Rejected strings
|
|
20
|
+
and the screening library's word list are not included in code or documentation.
|
|
21
|
+
|
|
22
|
+
Conservative matches may exclude harmless pet names. No exceptions are applied.
|
|
23
|
+
This policy is an English-language screen, not a universal linguistic classifier.
|
|
24
|
+
The dependency is development-only and is not imported by the provider at runtime.
|
|
25
|
+
|
|
26
|
+
For a refresh, explicitly download the documented aggregate query to a local file,
|
|
27
|
+
verify licensing and query completeness, then run:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
python tools/build_data.py /path/to/aggregate.json
|
|
31
|
+
python tools/build_data.py /path/to/aggregate.json --check
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Review statistics, membership, hashes and tests before releasing a new dataset
|
|
35
|
+
version. Re-fetching the live source may differ from the initial snapshot; never
|
|
36
|
+
silently replace source hashes or claim identical seeded results across changes.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Release checklist
|
|
2
|
+
|
|
3
|
+
1. Run tests, provider branch coverage, formatting, wheel/sdist builds and strict
|
|
4
|
+
Twine metadata validation. Install the wheel in a clean environment and run tests.
|
|
5
|
+
2. Verify the package includes the screened dataset, LICENSE and NOTICE, and excludes
|
|
6
|
+
source aggregates, credentials, caches, filter word lists and development environments.
|
|
7
|
+
3. Commit the reviewed sources; tag the exact release commit.
|
|
8
|
+
4. Publish the checked artifacts to PyPI. Use a scoped API token outside the repository
|
|
9
|
+
or the manually dispatched `publish.yml` workflow with a configured PyPI trusted publisher.
|
|
10
|
+
5. Download the published version in a fresh environment and verify usage and package tests.
|
|
11
|
+
6. Only then submit the community-provider listing change to joke2k/faker. Its requirements
|
|
12
|
+
include tests, PyPI publication, OSI-approved licensing, no duplicate built-in functionality,
|
|
13
|
+
no profanity, and no malicious or telemetry code.
|
|
14
|
+
|
|
15
|
+
Trusted publisher values: project `faker-pet-names`, owner `copyleftdev`, repository
|
|
16
|
+
`faker-pet-names`, workflow `publish.yml`, environment `pypi`. The workflow publishes
|
|
17
|
+
only a matching `v` version tag. No credentials belong in repository files or PR text.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "faker-pet-names"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Seeded dog and cat names for Faker from a screened public-domain Seattle dataset"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE", "NOTICE"]
|
|
13
|
+
authors = [{name = "copyleftdev"}]
|
|
14
|
+
dependencies = ["Faker==40.63.0"]
|
|
15
|
+
keywords = ["faker", "pet", "dog", "cat", "test-data"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 3 - Alpha",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
21
|
+
"Topic :: Software Development :: Testing",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
[project.urls]
|
|
25
|
+
Homepage = "https://github.com/copyleftdev/faker-pet-names"
|
|
26
|
+
Repository = "https://github.com/copyleftdev/faker-pet-names"
|
|
27
|
+
Issues = "https://github.com/copyleftdev/faker-pet-names/issues"
|
|
28
|
+
|
|
29
|
+
[project.optional-dependencies]
|
|
30
|
+
dev = ["pytest==9.2.0", "coverage==7.13.0", "black==26.10.1", "better-profanity==0.7.0", "build==1.6.1", "twine==7.0.0"]
|
|
31
|
+
|
|
32
|
+
[tool.setuptools.packages.find]
|
|
33
|
+
where = ["src"]
|
|
34
|
+
|
|
35
|
+
[tool.setuptools.package-data]
|
|
36
|
+
faker_pet_names = ["data/*.json"]
|
|
37
|
+
|
|
38
|
+
[tool.black]
|
|
39
|
+
line-length = 120
|
|
40
|
+
|
|
41
|
+
[tool.pytest.ini_options]
|
|
42
|
+
testpaths = ["tests"]
|
|
43
|
+
|
|
44
|
+
[tool.coverage.run]
|
|
45
|
+
branch = true
|
|
46
|
+
source = ["faker_pet_names"]
|
|
47
|
+
|
|
48
|
+
[tool.coverage.report]
|
|
49
|
+
fail_under = 100
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Seattle-derived pet names for Faker; see README.md for provenance and limits."""
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
from collections import OrderedDict
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
from faker.generator import Generator
|
|
8
|
+
from faker.providers import BaseProvider
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Provider(BaseProvider):
|
|
12
|
+
"""Species-specific names; honors Faker seeding and use_weighting."""
|
|
13
|
+
|
|
14
|
+
# City of Seattle public-domain pet-license aggregate, retrieved 2026-12-02.
|
|
15
|
+
# Alphabetical data and integer frequency weights are pinned on disk.
|
|
16
|
+
def __init__(self, generator: Generator) -> None:
|
|
17
|
+
super().__init__(generator)
|
|
18
|
+
data = json.loads((Path(__file__).parent / "data/names.json").read_text(encoding="utf-8"))
|
|
19
|
+
self._names = {species: OrderedDict(names) for species, names in data.items()}
|
|
20
|
+
|
|
21
|
+
def pet_name(self, species: str = "dog") -> str:
|
|
22
|
+
"""Return a dog or cat name; unsupported species fail explicitly."""
|
|
23
|
+
if not isinstance(species, str) or species.casefold() not in self._names:
|
|
24
|
+
raise ValueError("species must be dog or cat")
|
|
25
|
+
return self.random_element(self._names[species.casefold()])
|
|
26
|
+
|
|
27
|
+
def dog_name(self) -> str:
|
|
28
|
+
return self.pet_name("dog")
|
|
29
|
+
|
|
30
|
+
def cat_name(self) -> str:
|
|
31
|
+
return self.pet_name("cat")
|