genkit 0.2.0__tar.gz → 0.3.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.
- genkit-0.3.0/PKG-INFO +18 -0
- genkit-0.3.0/README.md +78 -0
- genkit-0.3.0/genkit.egg-info/PKG-INFO +18 -0
- genkit-0.3.0/genkit.egg-info/SOURCES.txt +6 -0
- genkit-0.3.0/genkit.egg-info/top_level.txt +1 -0
- genkit-0.3.0/setup.py +149 -0
- genkit-0.2.0/LICENSE +0 -25
- genkit-0.2.0/PKG-INFO +0 -258
- genkit-0.2.0/README.md +0 -244
- genkit-0.2.0/genkit/EmailGen/__init__.py +0 -0
- genkit-0.2.0/genkit/EmailGen/emailgen.py +0 -41
- genkit-0.2.0/genkit/PhoneGen/__init__.py +0 -0
- genkit-0.2.0/genkit/PhoneGen/country_code.py +0 -242
- genkit-0.2.0/genkit/PhoneGen/phonegen.py +0 -46
- genkit-0.2.0/genkit/ZipKit/__init__.py +0 -0
- genkit-0.2.0/genkit/ZipKit/utils/__init__.py +0 -0
- genkit-0.2.0/genkit/ZipKit/utils/india_pincode_16082024.py +0 -192524
- genkit-0.2.0/genkit/ZipKit/utils/source_info.py +0 -15
- genkit-0.2.0/genkit/ZipKit/zipkit.py +0 -125
- genkit-0.2.0/genkit/__init__.py +0 -1
- genkit-0.2.0/genkit/config.py +0 -15
- genkit-0.2.0/genkit/genkit.py +0 -123
- genkit-0.2.0/genkit.egg-info/PKG-INFO +0 -258
- genkit-0.2.0/genkit.egg-info/SOURCES.txt +0 -20
- genkit-0.2.0/genkit.egg-info/top_level.txt +0 -1
- genkit-0.2.0/setup.py +0 -19
- {genkit-0.2.0 → genkit-0.3.0}/genkit.egg-info/dependency_links.txt +0 -0
- {genkit-0.2.0 → genkit-0.3.0}/setup.cfg +0 -0
genkit-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: genkit
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Genkit requires Python >= 3.10. This placeholder release exists only to give older interpreters a clear upgrade message.
|
|
5
|
+
Home-page: https://genkit.dev
|
|
6
|
+
Author: Google
|
|
7
|
+
License: Apache-2.0
|
|
8
|
+
Requires-Python: <3.10
|
|
9
|
+
Description-Content-Type: text/plain
|
|
10
|
+
Dynamic: author
|
|
11
|
+
Dynamic: description
|
|
12
|
+
Dynamic: description-content-type
|
|
13
|
+
Dynamic: home-page
|
|
14
|
+
Dynamic: license
|
|
15
|
+
Dynamic: requires-python
|
|
16
|
+
Dynamic: summary
|
|
17
|
+
|
|
18
|
+
Genkit is an open-source framework for building AI-powered applications, from Google. It requires Python 3.10 or newer. This placeholder release exists only so that installs on older Python versions fail with a clear message instead of a resolver error. See https://genkit.dev/docs/python/get-started/
|
genkit-0.3.0/README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# genkit Python-floor shim
|
|
2
|
+
|
|
3
|
+
A one-time PyPI release (`genkit 0.3.0`, sdist only) that turns the
|
|
4
|
+
old-Python install experience from a silent wrong install into a clear
|
|
5
|
+
upgrade message.
|
|
6
|
+
|
|
7
|
+
## Why it exists
|
|
8
|
+
|
|
9
|
+
Genkit requires Python >= 3.10, but macOS ships Python 3.9 at
|
|
10
|
+
`/usr/bin/python3`. On that interpreter, `pip install genkit` used to
|
|
11
|
+
resolve `genkit 0.2.0` — an unrelated package from before the PyPI name
|
|
12
|
+
was transferred to this project ("random data like phone numbers") —
|
|
13
|
+
because those pre-transfer releases (0.1.0–0.2.0) declare
|
|
14
|
+
`Requires-Python: >=3.6` and pip silently falls back to them.
|
|
15
|
+
|
|
16
|
+
## How it works
|
|
17
|
+
|
|
18
|
+
- The shim declares `Requires-Python: <3.10`, so Python >= 3.10 can
|
|
19
|
+
never select it. Fresh installs on current Pythons keep getting the
|
|
20
|
+
real latest genkit.
|
|
21
|
+
- On Python <= 3.9, version 0.3.0 outranks the pre-transfer 0.2.0, pip
|
|
22
|
+
commits to it, and `setup.py` fails the **install phase** with a boxed
|
|
23
|
+
message: the 3.10 requirement plus uv / Homebrew / python.org
|
|
24
|
+
instructions. The failure must stay out of the metadata phase
|
|
25
|
+
(`egg_info`/`dist_info`/`sdist` succeed on purpose): old pip treats a
|
|
26
|
+
metadata failure as a discardable candidate and backtracks to the
|
|
27
|
+
pre-transfer 0.2.0 with exit 0 — the silent wrong install again.
|
|
28
|
+
- It is published as an **sdist only**. A wheel would install cleanly as
|
|
29
|
+
an empty package on old Pythons — exactly the silent failure this
|
|
30
|
+
prevents. Keep the `--sdist` flag in `publish_python.yml`.
|
|
31
|
+
- The boxed message is for `pip install genkit` and
|
|
32
|
+
`uv pip install genkit`. A second name on the same line
|
|
33
|
+
(`pip install genkit genkit-google-genai`) fails in the resolver on
|
|
34
|
+
that plugin's `Requires-Python: >=3.10` and never reaches this
|
|
35
|
+
`setup.py`.
|
|
36
|
+
|
|
37
|
+
The version never changes: 0.3.0 was never published (the history goes
|
|
38
|
+
0.3.0.dev2 -> 0.3.1), and it sits above 0.2.0 (the last pre-transfer
|
|
39
|
+
release) and below 0.3.1 (the first real genkit release).
|
|
40
|
+
`skip-existing: true` in the publish workflow makes re-publishing it on
|
|
41
|
+
every release tag a no-op after the first upload.
|
|
42
|
+
|
|
43
|
+
This directory is intentionally not a uv workspace member: it shares the
|
|
44
|
+
`genkit` project name with `packages/genkit`, and workspace project
|
|
45
|
+
names must be unique.
|
|
46
|
+
|
|
47
|
+
## Verifying
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Build (any Python >= 3.10):
|
|
51
|
+
uv build --sdist py/floor-shim --out-dir /tmp/shim-dist
|
|
52
|
+
|
|
53
|
+
# Old Python shows the boxed message (expected: install fails with instructions):
|
|
54
|
+
/usr/bin/python3 -m venv /tmp/v39 && /tmp/v39/bin/pip install --no-index \
|
|
55
|
+
--find-links /tmp/shim-dist genkit
|
|
56
|
+
|
|
57
|
+
# The load-bearing case — a competing old release is visible (stands in for
|
|
58
|
+
# the pre-transfer 0.2.0). Expected: exit != 0, boxed message, and NOTHING
|
|
59
|
+
# installed. If genkit 0.2.0 gets installed instead, the shim is failing at
|
|
60
|
+
# the metadata phase and old pip is backtracking past it:
|
|
61
|
+
mkdir -p /tmp/sq && printf 'from setuptools import setup\nsetup(name="genkit", version="0.2.0", python_requires=">=3.6")\n' > /tmp/sq/setup.py
|
|
62
|
+
uv build --wheel /tmp/sq --out-dir /tmp/shim-dist
|
|
63
|
+
/usr/bin/python3 -m venv /tmp/v39b && /tmp/v39b/bin/pip install --no-index \
|
|
64
|
+
--find-links /tmp/shim-dist genkit; /tmp/v39b/bin/pip show genkit
|
|
65
|
+
|
|
66
|
+
# Current Python ignores the shim even when visible (expected: installs real genkit):
|
|
67
|
+
python3.13 -m venv /tmp/v313 && /tmp/v313/bin/pip install \
|
|
68
|
+
--find-links /tmp/shim-dist genkit
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Required companion step: yank the pre-transfer releases
|
|
72
|
+
|
|
73
|
+
Yank 0.1.0, 0.1.3, 0.1.4, and 0.2.0 on pypi.org **before or together
|
|
74
|
+
with** the first shim publish. This is a precondition, not optional
|
|
75
|
+
cleanup: those releases are the fallback candidates old pip reaches for
|
|
76
|
+
whenever it decides to skip the shim, and yanking is what makes the
|
|
77
|
+
wrong package unreachable for every resolver generation. After the
|
|
78
|
+
yank, pinned installs (`genkit==0.2.0`) are the only way to reach them.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: genkit
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Genkit requires Python >= 3.10. This placeholder release exists only to give older interpreters a clear upgrade message.
|
|
5
|
+
Home-page: https://genkit.dev
|
|
6
|
+
Author: Google
|
|
7
|
+
License: Apache-2.0
|
|
8
|
+
Requires-Python: <3.10
|
|
9
|
+
Description-Content-Type: text/plain
|
|
10
|
+
Dynamic: author
|
|
11
|
+
Dynamic: description
|
|
12
|
+
Dynamic: description-content-type
|
|
13
|
+
Dynamic: home-page
|
|
14
|
+
Dynamic: license
|
|
15
|
+
Dynamic: requires-python
|
|
16
|
+
Dynamic: summary
|
|
17
|
+
|
|
18
|
+
Genkit is an open-source framework for building AI-powered applications, from Google. It requires Python 3.10 or newer. This placeholder release exists only so that installs on older Python versions fail with a clear message instead of a resolver error. See https://genkit.dev/docs/python/get-started/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
genkit-0.3.0/setup.py
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Copyright 2026 Google LLC
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
#
|
|
15
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
16
|
+
|
|
17
|
+
"""Python-floor shim for the `genkit` package on PyPI.
|
|
18
|
+
|
|
19
|
+
Real genkit releases require Python >= 3.10. On older interpreters
|
|
20
|
+
(like the Python 3.9 that macOS ships), pip either resolves nothing or
|
|
21
|
+
resolves an unrelated pre-transfer package that holds low version
|
|
22
|
+
numbers on PyPI. This sdist declares `Requires-Python: <3.10`, so
|
|
23
|
+
current interpreters can never select it, while old interpreters pick
|
|
24
|
+
it as their best candidate and get a clear how-to-upgrade message
|
|
25
|
+
instead of a resolver error.
|
|
26
|
+
|
|
27
|
+
Publish as sdist ONLY (`uv build --sdist`). A wheel would install
|
|
28
|
+
"successfully" as an empty package on old Pythons, which is the silent
|
|
29
|
+
failure this shim exists to prevent. Version 0.3.0 was never published
|
|
30
|
+
(the history goes 0.3.0.dev2 -> 0.3.1), so the shim fills that hole:
|
|
31
|
+
above the pre-transfer squatter releases (<= 0.2.0), below every real
|
|
32
|
+
genkit release (>= 0.3.1). It never needs to change.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
import sys
|
|
36
|
+
|
|
37
|
+
MIN_PYTHON = (3, 10)
|
|
38
|
+
|
|
39
|
+
# Fail at the build/install phase, not the metadata phase: old pip (e.g. the
|
|
40
|
+
# 21.2.4 bundled with macOS system Python) treats a metadata-build failure as
|
|
41
|
+
# a discardable candidate and backtracks to the pre-transfer 0.2.0 — the
|
|
42
|
+
# exact silent wrong-install this shim exists to prevent. An install-phase
|
|
43
|
+
# failure is fatal on every pip generation, so the user actually sees the
|
|
44
|
+
# message and nothing gets installed.
|
|
45
|
+
_METADATA_ONLY_COMMANDS = {'egg_info', 'dist_info', 'sdist'}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
# Annotations here must stay plain builtin names: this function runs on
|
|
49
|
+
# whatever ancient interpreter the user has (the shim's whole audience), and
|
|
50
|
+
# subscripted generics like `tuple[int, ...]` evaluate at def time and raise
|
|
51
|
+
# TypeError before 3.9 — the user would get a traceback instead of the
|
|
52
|
+
# upgrade message.
|
|
53
|
+
def _format_error_message(min_ver: tuple, cur_ver: tuple) -> str:
|
|
54
|
+
min_str = '.'.join(map(str, min_ver))
|
|
55
|
+
cur_str = '.'.join(map(str, cur_ver[:3]))
|
|
56
|
+
|
|
57
|
+
if sys.platform == 'win32':
|
|
58
|
+
platform_hint = f'Windows requires Python {min_str}+ to run Genkit.'
|
|
59
|
+
recipes = (
|
|
60
|
+
' # Option 1 (Recommended): uv (manages Python versions automatically)\n'
|
|
61
|
+
' powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"\n'
|
|
62
|
+
' uv init && uv add genkit\n'
|
|
63
|
+
'\n'
|
|
64
|
+
f' # Option 2: Download Python (>= {min_str}) from https://www.python.org/downloads/\n'
|
|
65
|
+
' python -m venv .venv && .venv\\Scripts\\pip install genkit'
|
|
66
|
+
)
|
|
67
|
+
elif sys.platform == 'darwin':
|
|
68
|
+
platform_hint = (
|
|
69
|
+
'macOS ships an older Python at /usr/bin/python3.\n'
|
|
70
|
+
f'To use Genkit, install Python {min_str}+ using one of the options below:'
|
|
71
|
+
)
|
|
72
|
+
recipes = (
|
|
73
|
+
' # Option 1 (Recommended): uv (manages Python for you)\n'
|
|
74
|
+
' curl -LsSf https://astral.sh/uv/install.sh | sh\n'
|
|
75
|
+
' uv init && uv add genkit\n'
|
|
76
|
+
'\n'
|
|
77
|
+
' # Option 2: Homebrew\n'
|
|
78
|
+
' brew install python\n'
|
|
79
|
+
' python3 -m venv .venv && source .venv/bin/activate\n'
|
|
80
|
+
' pip install genkit\n'
|
|
81
|
+
'\n'
|
|
82
|
+
' # Option 3: Download installer from https://www.python.org/downloads/'
|
|
83
|
+
)
|
|
84
|
+
else:
|
|
85
|
+
platform_hint = (
|
|
86
|
+
f'Your system Python is older than the required Python {min_str}+.\n'
|
|
87
|
+
f'To use Genkit, install Python {min_str}+ using one of the options below:'
|
|
88
|
+
)
|
|
89
|
+
recipes = (
|
|
90
|
+
' # Option 1 (Recommended): uv (standalone, no root required)\n'
|
|
91
|
+
' curl -LsSf https://astral.sh/uv/install.sh | sh\n'
|
|
92
|
+
' uv init && uv add genkit\n'
|
|
93
|
+
'\n'
|
|
94
|
+
' # Option 2: System Package Manager\n'
|
|
95
|
+
' sudo apt update && sudo apt install python3 python3-venv\n'
|
|
96
|
+
' python3 -m venv .venv && source .venv/bin/activate\n'
|
|
97
|
+
' pip install genkit\n'
|
|
98
|
+
'\n'
|
|
99
|
+
' # Option 3: Download installer from https://www.python.org/downloads/'
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
return (
|
|
103
|
+
'\n'
|
|
104
|
+
'========================================================================\n'
|
|
105
|
+
f'Genkit requires Python {min_str}+, but you are running Python {cur_str}.\n'
|
|
106
|
+
'\n'
|
|
107
|
+
f'{platform_hint}\n'
|
|
108
|
+
'\n'
|
|
109
|
+
f'{recipes}\n'
|
|
110
|
+
'\n'
|
|
111
|
+
'Docs: https://genkit.dev/docs/python/get-started/\n'
|
|
112
|
+
'========================================================================\n'
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
if sys.version_info < MIN_PYTHON and not _METADATA_ONLY_COMMANDS.intersection(sys.argv[1:]):
|
|
117
|
+
sys.exit(_format_error_message(MIN_PYTHON, sys.version_info))
|
|
118
|
+
|
|
119
|
+
# The shim must never ship as a wheel: wheels run no code at install time,
|
|
120
|
+
# so on an old Python a wheel would install "successfully" as an empty
|
|
121
|
+
# package — the exact silent failure this shim exists to prevent. Refusing
|
|
122
|
+
# here (after the version guard, so old interpreters still get the upgrade
|
|
123
|
+
# box) makes sdist-only self-enforcing instead of workflow-flag-dependent.
|
|
124
|
+
if 'bdist_wheel' in sys.argv[1:]:
|
|
125
|
+
sys.exit('The genkit floor shim is sdist-only; refusing to build a wheel. See py/floor-shim/README.md.')
|
|
126
|
+
|
|
127
|
+
from setuptools import setup # noqa: E402
|
|
128
|
+
|
|
129
|
+
setup(
|
|
130
|
+
name='genkit',
|
|
131
|
+
version='0.3.0',
|
|
132
|
+
description=(
|
|
133
|
+
'Genkit requires Python >= 3.10. This placeholder release exists only '
|
|
134
|
+
'to give older interpreters a clear upgrade message.'
|
|
135
|
+
),
|
|
136
|
+
long_description=(
|
|
137
|
+
'Genkit is an open-source framework for building AI-powered '
|
|
138
|
+
'applications, from Google. It requires Python 3.10 or newer. '
|
|
139
|
+
'This placeholder release exists only so that installs on older '
|
|
140
|
+
'Python versions fail with a clear message instead of a resolver '
|
|
141
|
+
'error. See https://genkit.dev/docs/python/get-started/'
|
|
142
|
+
),
|
|
143
|
+
long_description_content_type='text/plain',
|
|
144
|
+
url='https://genkit.dev',
|
|
145
|
+
author='Google',
|
|
146
|
+
license='Apache-2.0',
|
|
147
|
+
python_requires='<3.10',
|
|
148
|
+
py_modules=[],
|
|
149
|
+
)
|
genkit-0.2.0/LICENSE
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
**5. `LICENSE`**
|
|
2
|
-
|
|
3
|
-
```markdown
|
|
4
|
-
MIT License
|
|
5
|
-
|
|
6
|
-
Copyright (c) [2024] [Suhail]
|
|
7
|
-
|
|
8
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
-
in the Software without restriction, including without limitation the rights
|
|
11
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
-
furnished to do so, subject to the following conditions:
|
|
14
|
-
|
|
15
|
-
The above copyright notice and this permission notice shall be included in all
|
|
16
|
-
copies or substantial portions of the Software.
|
|
17
|
-
|
|
18
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
-
SOFTWARE.
|
|
25
|
-
```
|
genkit-0.2.0/PKG-INFO
DELETED
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: genkit
|
|
3
|
-
Version: 0.2.0
|
|
4
|
-
Summary: A Python package for generating random data like phone numbers .
|
|
5
|
-
Author: Suhail Shaji
|
|
6
|
-
Author-email: suhailshaji@gmail.com
|
|
7
|
-
Keywords: random phone number generator,genkit,generate random phone number with country code
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
-
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Python: >=3.6
|
|
12
|
-
Description-Content-Type: text/markdown
|
|
13
|
-
License-File: LICENSE
|
|
14
|
-
|
|
15
|
-
# GenKit
|
|
16
|
-
|
|
17
|
-
**GenKit** is a versatile Python package designed to generate random data such as phone numbers and email addresses, and to retrieve and filter zip code information. Whether you're developing, testing, or just need random data generation utilities, **GenKit** is the tool for you.
|
|
18
|
-
|
|
19
|
-
## Features
|
|
20
|
-
|
|
21
|
-
- **Zip Code Information**
|
|
22
|
-
- Retrieve zip code information based on country, city, and state.
|
|
23
|
-
- List all zip codes for a country or find specific zip code details.
|
|
24
|
-
- **Phone Number Generation**
|
|
25
|
-
- Generate random phone numbers for different countries.
|
|
26
|
-
- Supports output in string, list, and dictionary formats.
|
|
27
|
-
- Option to save generated phone numbers to a file.
|
|
28
|
-
- **Email Address Generation**
|
|
29
|
-
- Generate random email addresses with customizable domains and username lengths.
|
|
30
|
-
- Multiple output formats: string, list, and dictionary.
|
|
31
|
-
- Option to save generated email addresses to a file.
|
|
32
|
-
|
|
33
|
-
## Installation
|
|
34
|
-
|
|
35
|
-
You can easily install genkit using pip. Run the following command to install it:
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
pip install genkit
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Usage
|
|
44
|
-
|
|
45
|
-
### Zip Code Information
|
|
46
|
-
|
|
47
|
-
The `zipkit` method provides a simple way to retrieve zip code information based on your filters. You can find specific details about a zip code or get a list of zip codes filtered by country, state, and city.
|
|
48
|
-
|
|
49
|
-
#### Features
|
|
50
|
-
|
|
51
|
-
- **Find Zip Code Details**
|
|
52
|
-
Get detailed information about a specific zip code.
|
|
53
|
-
- **Filter Zip Codes**
|
|
54
|
-
Retrieve a list of zip codes based on country, state, or city filters, or a combination of these.
|
|
55
|
-
##### **Parameters**
|
|
56
|
-
|
|
57
|
-
| Parameters | Default | Description |
|
|
58
|
-
| ------------------------ | --------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
|
59
|
-
| **country** (str) | IN(India) | The country for which you want to retrieve zip code information |
|
|
60
|
-
| **state** (str) | optional | The state within the country to filter zip codes. |
|
|
61
|
-
| **city** (str) | optional | The city within the state to filter zip codes. |
|
|
62
|
-
| **find** (str) | | A specific zip code to look up. If provided, this overrides other filters and returns the details for the specified zip<br /> code. |
|
|
63
|
-
|
|
64
|
-
#### Examples
|
|
65
|
-
|
|
66
|
-
```
|
|
67
|
-
from genkit import GenKit
|
|
68
|
-
|
|
69
|
-
gk = GenKit()
|
|
70
|
-
zipcode_info = gk.zipkit(country="US", state="CA", city="San Francisco")
|
|
71
|
-
print(zipcode_info)
|
|
72
|
-
|
|
73
|
-
# Example of finding a specific zip code
|
|
74
|
-
zipcode_details = gk.zipkit(find="682301")
|
|
75
|
-
print(zipcode_details)
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
#### **Example Output:**
|
|
79
|
-
|
|
80
|
-
```python
|
|
81
|
-
print(zipcode_details)
|
|
82
|
-
{
|
|
83
|
-
"Country": "IN",
|
|
84
|
-
"Zip Code": "682301",
|
|
85
|
-
"City": "ERNAKULAM",
|
|
86
|
-
"State": "Kerala",
|
|
87
|
-
"Circle name": "Kerala Circle",
|
|
88
|
-
"Region name": "Kochi Region",
|
|
89
|
-
"Office name": "Tripunithura SO",
|
|
90
|
-
"Office type": "SO",
|
|
91
|
-
"Delivery status": "Delivery"
|
|
92
|
-
}
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
#### Supported Countries
|
|
96
|
-
|
|
97
|
-
Currently, **GenKit** supports zip code information for:
|
|
98
|
-
|
|
99
|
-
- **India (IN)**
|
|
100
|
-
- **United States (US)**
|
|
101
|
-
|
|
102
|
-
More countries will be added in future updates.
|
|
103
|
-
|
|
104
|
-
### Phone Number Generation
|
|
105
|
-
|
|
106
|
-
The `phonenumber` method in **GenKit** allows you to generate random phone numbers. You can specify the country, the number of phone numbers to generate, the output format, and whether the numbers should be saved to a file.
|
|
107
|
-
|
|
108
|
-
#### Features
|
|
109
|
-
|
|
110
|
-
- **Generate Random Phone Numbers**
|
|
111
|
-
Generate one or more random phone numbers based on the specified country. The numbers can be returned in various formats and saved to a file if needed.
|
|
112
|
-
- **Output Formats**
|
|
113
|
-
- **String** : A phone number as a string.
|
|
114
|
-
- **List** : A list of phone numbers.
|
|
115
|
-
- **Dictionary** : A dictionary with the data as the key and a list of phone numbers as the value.
|
|
116
|
-
|
|
117
|
-
#### **Parameters**
|
|
118
|
-
|
|
119
|
-
| Parameters | Default | Description |
|
|
120
|
-
| ------------------------ | --------- | -------------------------------------------------------------------------------- |
|
|
121
|
-
| **country** (str) | IN(India) | The country code (e.g., "IN" for India, "US" for the United States). |
|
|
122
|
-
| **n** (int) | 1 | The state within the country to filter zip codes. |
|
|
123
|
-
| **type** (str) | string | The format of the generated phone number(s). Can be "string", "list", or "dict". |
|
|
124
|
-
| **save** (bool) | True | Whether to save the generated phone numbers to a text file. |
|
|
125
|
-
|
|
126
|
-
Use 2-digit ISO codes to generate
|
|
127
|
-
|
|
128
|
-
#### Examples
|
|
129
|
-
|
|
130
|
-
#### Generating a Single Phone Number
|
|
131
|
-
|
|
132
|
-
```
|
|
133
|
-
from genkit import GenKit
|
|
134
|
-
|
|
135
|
-
# Generate a phone number for India (default)
|
|
136
|
-
print(GenKit.phonenumber())
|
|
137
|
-
|
|
138
|
-
# Generate a phone number for the US
|
|
139
|
-
print(GenKit.phonenumber("US"))
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
#### Generating Multiple Phone Numbers
|
|
145
|
-
|
|
146
|
-
To generate multiple phone numbers, use the `n` parameter to specify the quantity. You can also specify the output format using the `type` parameter.
|
|
147
|
-
|
|
148
|
-
```
|
|
149
|
-
from genkit import GenKit
|
|
150
|
-
|
|
151
|
-
# Generate 5 phone numbers for India and return as a list
|
|
152
|
-
print(GenKit.phonenumber("IN", n=5, type="list"))
|
|
153
|
-
|
|
154
|
-
# Generate 3 phone numbers for the US and return as a dictionary
|
|
155
|
-
print(GenKit.phonenumber("US", n=3, type="dict"))
|
|
156
|
-
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
#### Saving to a File
|
|
160
|
-
|
|
161
|
-
You can save the generated phone numbers to a text file. The file will be named `genkit_TIMESTAMP.txt`, where `TIMESTAMP` is the current timestamp.
|
|
162
|
-
|
|
163
|
-
```
|
|
164
|
-
from genkit import GenKit
|
|
165
|
-
|
|
166
|
-
# Generate 5 phone numbers for India and save to a file
|
|
167
|
-
GenKit.phonenumber("IN", n=5, save=True)
|
|
168
|
-
|
|
169
|
-
# Generate 3 phone numbers for the US in dictionary format and save to a file
|
|
170
|
-
GenKit.phonenumber("US", n=3, type="dict", save=True)
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
### Email Address Generation
|
|
176
|
-
|
|
177
|
-
The `email` method in **GenKit** helps you generate random email addresses. You can customize the domain, the length of the emails, the output format, and whether the emails should be saved to a file.
|
|
178
|
-
|
|
179
|
-
#### Features
|
|
180
|
-
|
|
181
|
-
- **Generate Random Email Addresses**
|
|
182
|
-
Generate one or more random email addresses with customizable domains and username lengths.
|
|
183
|
-
- **Output Formats**
|
|
184
|
-
- **String** : A email address as a string.
|
|
185
|
-
- **List** : A list of email addresses.
|
|
186
|
-
- **Dictionary** : A dictionary with the data as the key and a list of email as the value.
|
|
187
|
-
|
|
188
|
-
#### Parameters
|
|
189
|
-
|
|
190
|
-
| Parameters | Default | Description |
|
|
191
|
-
| ------------------------ | ----------- | ------------------------------------------------------------------------- |
|
|
192
|
-
| **domain** (str) | example.com | The email domain to use (e.g., "example.com"). |
|
|
193
|
-
| **length** (int) | 8 | The length of the generated email username. |
|
|
194
|
-
| **type** (str) | string | The format of the generated email(s). Can be "string", "list", or "dict". |
|
|
195
|
-
| **n** (int) | 1 | The number of email addresses to generate. |
|
|
196
|
-
| **save** (bool) | True | Whether to save the generated email addresses to a text file. |
|
|
197
|
-
|
|
198
|
-
#### Examples
|
|
199
|
-
|
|
200
|
-
#### Generating a Single Email Address
|
|
201
|
-
|
|
202
|
-
```
|
|
203
|
-
from genkit import GenKit
|
|
204
|
-
|
|
205
|
-
# Generate a random email address
|
|
206
|
-
print(GenKit.emailkit())
|
|
207
|
-
|
|
208
|
-
# Generate a random email address with a custom domain
|
|
209
|
-
print(GenKit.emailkit(domain="customdomain.com"))
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
#### Generating Multiple Email Addresses
|
|
213
|
-
|
|
214
|
-
To generate multiple email addresses, use the `n` parameter to specify the quantity. You can also specify the output format using the `type` parameter.
|
|
215
|
-
|
|
216
|
-
```
|
|
217
|
-
from genkit import GenKit
|
|
218
|
-
|
|
219
|
-
# Generate 5 random email addresses and return as a list
|
|
220
|
-
print(GenKit.emailkit(n=5, type="list"))
|
|
221
|
-
|
|
222
|
-
# Generate 3 random email addresses with a custom domain and return as a dictionary
|
|
223
|
-
print(GenKit.emailkit(domain="customdomain.com", n=3, type="dict"))
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
#### Saving to a File
|
|
227
|
-
|
|
228
|
-
You can save the generated email addresses to a text file. The file will be named `genkit_TIMESTAMP.txt`, where `TIMESTAMP` is the current timestamp.
|
|
229
|
-
|
|
230
|
-
```
|
|
231
|
-
from genkit import GenKit
|
|
232
|
-
|
|
233
|
-
# Generate 5 random email addresses and save to a file
|
|
234
|
-
GenKit.emailkit(n=5, save=True)
|
|
235
|
-
|
|
236
|
-
# Generate 3 random email addresses with a custom domain in dictionary format and save to a file
|
|
237
|
-
GenKit.emailkit(domain="customdomain.com", n=3, length=10, type="dict", save=True)
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
## Authors
|
|
241
|
-
|
|
242
|
-
For any questions or issues, please contact:
|
|
243
|
-
|
|
244
|
-
- **Author** : [Suhail Shaji](https://github.com/suhailshaji)
|
|
245
|
-
- **Email** : [suhailshaji@gmail.com]()
|
|
246
|
-
|
|
247
|
-
## Feedback
|
|
248
|
-
|
|
249
|
-
If you have any feedback, please reach out to us at
|
|
250
|
-
suhailshaji@gmail.com
|
|
251
|
-
|
|
252
|
-
## License
|
|
253
|
-
|
|
254
|
-
[MIT](https://choosealicense.com/licenses/mit/)
|
|
255
|
-
|
|
256
|
-
## 🔗 Connect
|
|
257
|
-
|
|
258
|
-
[](https://www.linkedin.com/in/suhailshaji)
|