hey-api 0.0.24__py3-none-win_amd64.whl
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.
- hey_api/__init__.py +5 -0
- hey_api/__main__.py +67 -0
- hey_api/bin/.gitkeep +0 -0
- hey_api/bin/openapi-python-win-x64.exe +0 -0
- hey_api-0.0.24.dist-info/METADATA +75 -0
- hey_api-0.0.24.dist-info/RECORD +9 -0
- hey_api-0.0.24.dist-info/WHEEL +5 -0
- hey_api-0.0.24.dist-info/entry_points.txt +3 -0
- hey_api-0.0.24.dist-info/licenses/LICENSE +21 -0
hey_api/__init__.py
ADDED
hey_api/__main__.py
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""Run as `python -m hey_api`, `hey-api`, or `openapi-python`."""
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import platform
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
import signal
|
|
7
|
+
import subprocess
|
|
8
|
+
import sys
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_binary_path() -> str:
|
|
12
|
+
"""Returns the path to the bundled openapi-python binary."""
|
|
13
|
+
bin_dir = Path(__file__).parent / "bin"
|
|
14
|
+
system = platform.system().lower()
|
|
15
|
+
machine = platform.machine().lower()
|
|
16
|
+
|
|
17
|
+
if machine in ("x86_64", "amd64"):
|
|
18
|
+
arch = "x64"
|
|
19
|
+
elif machine in ("arm64", "aarch64"):
|
|
20
|
+
arch = "arm64"
|
|
21
|
+
else:
|
|
22
|
+
raise RuntimeError(f"Unsupported architecture: {machine}")
|
|
23
|
+
|
|
24
|
+
if system == "windows":
|
|
25
|
+
name = f"openapi-python-win-{arch}.exe"
|
|
26
|
+
elif system == "darwin":
|
|
27
|
+
name = f"openapi-python-darwin-{arch}"
|
|
28
|
+
elif system == "linux":
|
|
29
|
+
name = f"openapi-python-linux-{arch}"
|
|
30
|
+
else:
|
|
31
|
+
raise RuntimeError(f"Unsupported platform: {system}")
|
|
32
|
+
|
|
33
|
+
path = bin_dir / name
|
|
34
|
+
if not path.is_file():
|
|
35
|
+
raise FileNotFoundError(
|
|
36
|
+
f"Binary not found at {path}. "
|
|
37
|
+
f"This pre-release does not include bundled binaries. "
|
|
38
|
+
f"Install a stable release or use npx @hey-api/openapi-python instead. "
|
|
39
|
+
f"https://heyapi.dev/docs/openapi/python/get-started"
|
|
40
|
+
)
|
|
41
|
+
return str(path)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def main() -> int:
|
|
45
|
+
try:
|
|
46
|
+
binary = _get_binary_path()
|
|
47
|
+
except (FileNotFoundError, RuntimeError) as exc:
|
|
48
|
+
print(f"Error: {exc}", file=sys.stderr)
|
|
49
|
+
return 1
|
|
50
|
+
|
|
51
|
+
if sys.platform != "win32":
|
|
52
|
+
os.chmod(binary, 0o755)
|
|
53
|
+
|
|
54
|
+
try:
|
|
55
|
+
result = subprocess.run(
|
|
56
|
+
[binary, *sys.argv[1:]],
|
|
57
|
+
stdin=sys.stdin,
|
|
58
|
+
stdout=sys.stdout,
|
|
59
|
+
stderr=sys.stderr,
|
|
60
|
+
)
|
|
61
|
+
return result.returncode
|
|
62
|
+
except KeyboardInterrupt:
|
|
63
|
+
return 128 + signal.SIGINT
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
if __name__ == "__main__":
|
|
67
|
+
raise SystemExit(main())
|
hey_api/bin/.gitkeep
ADDED
|
File without changes
|
|
Binary file
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hey-api
|
|
3
|
+
Version: 0.0.24
|
|
4
|
+
Summary: OpenAPI to Python code generator. Production-grade SDKs and Pydantic models.
|
|
5
|
+
Project-URL: Homepage, https://heyapi.dev/docs/openapi/python/get-started
|
|
6
|
+
Project-URL: Documentation, https://heyapi.dev/docs/openapi/python/get-started
|
|
7
|
+
Project-URL: Repository, https://github.com/hey-api/hey-api
|
|
8
|
+
Project-URL: Issues, https://github.com/hey-api/hey-api/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/hey-api/hey-api/releases
|
|
10
|
+
Project-URL: Funding, https://github.com/sponsors/hey-api
|
|
11
|
+
Author-email: Hey API <lubos@heyapi.dev>
|
|
12
|
+
License-Expression: MIT
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Keywords: api,api-client,codegen,fastapi,generator,httpx,openapi,pydantic,sdk,swagger
|
|
15
|
+
Classifier: Development Status :: 3 - Alpha
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
25
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
26
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
27
|
+
Requires-Python: >=3.9
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# Hey API
|
|
31
|
+
|
|
32
|
+
OpenAPI to Python code generator. Production-grade SDKs and Pydantic models. Built by [Hey API](https://heyapi.dev).
|
|
33
|
+
|
|
34
|
+
## Installation
|
|
35
|
+
|
|
36
|
+
### uv
|
|
37
|
+
|
|
38
|
+
Install:
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
uv add hey-api
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Or run without installing:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
uvx hey-api --help
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### pip
|
|
51
|
+
|
|
52
|
+
Install:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
pip install hey-api
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Or run without installing:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
pipx run hey-api
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Usage
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
hey-api --help
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Resources
|
|
71
|
+
|
|
72
|
+
- [Manual](https://heyapi.dev/docs/openapi/python/get-started)
|
|
73
|
+
- [GitHub](https://github.com/hey-api/hey-api)
|
|
74
|
+
- [npm](https://npmjs.com/package/@hey-api/openapi-python)
|
|
75
|
+
- [Sponsor](https://github.com/sponsors/hey-api)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
hey_api/__init__.py,sha256=oktPq9teaE008Ch1B70d-aQkkkkVInPVKOQHsphJxM0,122
|
|
2
|
+
hey_api/__main__.py,sha256=6hA_ll1vzkTAWfzDdFmOXxARRsNugxhemlY7BS6W83I,1848
|
|
3
|
+
hey_api/bin/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
hey_api/bin/openapi-python-win-x64.exe,sha256=JenX0S_OaEHlLPgfMcLcX85azfisSDBfJarGSRhmxTc,104768840
|
|
5
|
+
hey_api-0.0.24.dist-info/METADATA,sha256=UnzagFvvXw2ZsCznIxIgC1pglnDrZtSTWGX-KzbS2sk,2025
|
|
6
|
+
hey_api-0.0.24.dist-info/WHEEL,sha256=pp_iTzO0EBcCvlZZV2dJYp6L2tdDWBsn1ceo50wEt8Q,94
|
|
7
|
+
hey_api-0.0.24.dist-info/entry_points.txt,sha256=n06MZrfDMUwGsp3XntXs6Oxd3xwYoYIYyhR_21qGysI,89
|
|
8
|
+
hey_api-0.0.24.dist-info/licenses/LICENSE,sha256=KXk2QK1rJOrl3eueMJ8ZHVbiR2v2FV4e_RkCCLbNcO4,1072
|
|
9
|
+
hey_api-0.0.24.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026-present Hey API
|
|
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.
|