planefyi 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.
- planefyi-0.1.0/LICENSE +21 -0
- planefyi-0.1.0/PKG-INFO +63 -0
- planefyi-0.1.0/README.md +23 -0
- planefyi-0.1.0/demo.tape +34 -0
- planefyi-0.1.0/pyproject.toml +86 -0
- planefyi-0.1.0/src/planefyi/__init__.py +3 -0
- planefyi-0.1.0/src/planefyi/api.py +58 -0
- planefyi-0.1.0/src/planefyi/cli.py +19 -0
- planefyi-0.1.0/src/planefyi/mcp_server.py +18 -0
- planefyi-0.1.0/src/planefyi/py.typed +0 -0
- planefyi-0.1.0/tests/__init__.py +0 -0
- planefyi-0.1.0/tests/test_basic.py +7 -0
- planefyi-0.1.0/uv.lock +1137 -0
planefyi-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 FYIPedia
|
|
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.
|
planefyi-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: planefyi
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Aircraft models and specifications API client — planefyi.com
|
|
5
|
+
Project-URL: Homepage, https://planefyi.com
|
|
6
|
+
Project-URL: Documentation, https://planefyi.com/developers/
|
|
7
|
+
Project-URL: Repository, https://github.com/fyipedia/planefyi
|
|
8
|
+
Project-URL: Issues, https://github.com/fyipedia/planefyi/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/fyipedia/planefyi/releases
|
|
10
|
+
Author: FYIPedia
|
|
11
|
+
License-Expression: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: airbus,aircraft,airplane,aviation,boeing,manufacturer,plane,specification
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
25
|
+
Classifier: Typing :: Typed
|
|
26
|
+
Requires-Python: >=3.10
|
|
27
|
+
Provides-Extra: all
|
|
28
|
+
Requires-Dist: httpx>=0.27; extra == 'all'
|
|
29
|
+
Requires-Dist: mcp>=1.0; extra == 'all'
|
|
30
|
+
Requires-Dist: rich>=13.0; extra == 'all'
|
|
31
|
+
Requires-Dist: typer>=0.15; extra == 'all'
|
|
32
|
+
Provides-Extra: api
|
|
33
|
+
Requires-Dist: httpx>=0.27; extra == 'api'
|
|
34
|
+
Provides-Extra: cli
|
|
35
|
+
Requires-Dist: rich>=13.0; extra == 'cli'
|
|
36
|
+
Requires-Dist: typer>=0.15; extra == 'cli'
|
|
37
|
+
Provides-Extra: mcp
|
|
38
|
+
Requires-Dist: mcp>=1.0; extra == 'mcp'
|
|
39
|
+
Description-Content-Type: text/markdown
|
|
40
|
+
|
|
41
|
+
# planefyi
|
|
42
|
+
|
|
43
|
+
Aircraft models and specifications API client — [planefyi.com](https://planefyi.com)
|
|
44
|
+
|
|
45
|
+
## Install
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install planefyi
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Quick Start
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
from planefyi.api import PlaneFYI
|
|
55
|
+
|
|
56
|
+
with PlaneFYI() as api:
|
|
57
|
+
results = api.search("747")
|
|
58
|
+
print(results)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## License
|
|
62
|
+
|
|
63
|
+
MIT
|
planefyi-0.1.0/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# planefyi
|
|
2
|
+
|
|
3
|
+
Aircraft models and specifications API client — [planefyi.com](https://planefyi.com)
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install planefyi
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from planefyi.api import PlaneFYI
|
|
15
|
+
|
|
16
|
+
with PlaneFYI() as api:
|
|
17
|
+
results = api.search("747")
|
|
18
|
+
print(results)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## License
|
|
22
|
+
|
|
23
|
+
MIT
|
planefyi-0.1.0/demo.tape
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# planefyi — Python API Client Demo
|
|
2
|
+
Output demo.gif
|
|
3
|
+
|
|
4
|
+
Set FontSize 20
|
|
5
|
+
Set Width 1000
|
|
6
|
+
Set Height 580
|
|
7
|
+
Set Shell "zsh"
|
|
8
|
+
Set Theme "Catppuccin Mocha"
|
|
9
|
+
Set TypingSpeed 30ms
|
|
10
|
+
Set Padding 24
|
|
11
|
+
|
|
12
|
+
Type "uv run --with 'planefyi[api]' python3"
|
|
13
|
+
Enter
|
|
14
|
+
Sleep 2.5s
|
|
15
|
+
|
|
16
|
+
Type "from planefyi.api import PlaneFYI"
|
|
17
|
+
Enter
|
|
18
|
+
Sleep 1s
|
|
19
|
+
|
|
20
|
+
Type "client = PlaneFYI()"
|
|
21
|
+
Enter
|
|
22
|
+
Sleep 1s
|
|
23
|
+
|
|
24
|
+
Type "# Search planefyi.com"
|
|
25
|
+
Enter
|
|
26
|
+
Sleep 0.5s
|
|
27
|
+
|
|
28
|
+
Type "client.search('747')"
|
|
29
|
+
Enter
|
|
30
|
+
Sleep 2.5s
|
|
31
|
+
|
|
32
|
+
Type "exit()"
|
|
33
|
+
Enter
|
|
34
|
+
Sleep 1s
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "planefyi"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Aircraft models and specifications API client — planefyi.com"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
requires-python = ">=3.10"
|
|
8
|
+
authors = [{ name = "FYIPedia" }]
|
|
9
|
+
keywords = [
|
|
10
|
+
"aircraft",
|
|
11
|
+
"airplane",
|
|
12
|
+
"aviation",
|
|
13
|
+
"specification",
|
|
14
|
+
"manufacturer",
|
|
15
|
+
"boeing",
|
|
16
|
+
"airbus",
|
|
17
|
+
"plane",
|
|
18
|
+
]
|
|
19
|
+
classifiers = [
|
|
20
|
+
"Development Status :: 4 - Beta",
|
|
21
|
+
"Intended Audience :: Developers",
|
|
22
|
+
"License :: OSI Approved :: MIT License",
|
|
23
|
+
"Programming Language :: Python :: 3",
|
|
24
|
+
"Programming Language :: Python :: 3.10",
|
|
25
|
+
"Programming Language :: Python :: 3.11",
|
|
26
|
+
"Programming Language :: Python :: 3.12",
|
|
27
|
+
"Programming Language :: Python :: 3.13",
|
|
28
|
+
"Programming Language :: Python :: 3.14",
|
|
29
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
30
|
+
"Typing :: Typed",
|
|
31
|
+
"Environment :: Console",
|
|
32
|
+
]
|
|
33
|
+
dependencies = []
|
|
34
|
+
|
|
35
|
+
[project.optional-dependencies]
|
|
36
|
+
api = ["httpx>=0.27"]
|
|
37
|
+
cli = ["typer>=0.15", "rich>=13.0"]
|
|
38
|
+
mcp = ["mcp>=1.0"]
|
|
39
|
+
all = ["planefyi[api,cli,mcp]"]
|
|
40
|
+
|
|
41
|
+
[project.scripts]
|
|
42
|
+
planefyi = "planefyi.cli:app"
|
|
43
|
+
|
|
44
|
+
[project.entry-points."mcp.servers"]
|
|
45
|
+
planefyi = "planefyi.mcp_server:mcp"
|
|
46
|
+
|
|
47
|
+
[project.urls]
|
|
48
|
+
Homepage = "https://planefyi.com"
|
|
49
|
+
Documentation = "https://planefyi.com/developers/"
|
|
50
|
+
Repository = "https://github.com/fyipedia/planefyi"
|
|
51
|
+
Issues = "https://github.com/fyipedia/planefyi/issues"
|
|
52
|
+
Changelog = "https://github.com/fyipedia/planefyi/releases"
|
|
53
|
+
|
|
54
|
+
[build-system]
|
|
55
|
+
requires = ["hatchling"]
|
|
56
|
+
build-backend = "hatchling.build"
|
|
57
|
+
|
|
58
|
+
[tool.hatch.build.targets.wheel]
|
|
59
|
+
packages = ["src/planefyi"]
|
|
60
|
+
|
|
61
|
+
[tool.pytest.ini_options]
|
|
62
|
+
testpaths = ["tests"]
|
|
63
|
+
addopts = "-v --tb=short"
|
|
64
|
+
|
|
65
|
+
[tool.ruff]
|
|
66
|
+
target-version = "py310"
|
|
67
|
+
line-length = 100
|
|
68
|
+
|
|
69
|
+
[tool.ruff.lint]
|
|
70
|
+
select = ["E", "F", "I", "UP", "B", "SIM", "RUF"]
|
|
71
|
+
ignore = ["RUF022"]
|
|
72
|
+
|
|
73
|
+
[tool.mypy]
|
|
74
|
+
python_version = "3.10"
|
|
75
|
+
strict = true
|
|
76
|
+
|
|
77
|
+
[dependency-groups]
|
|
78
|
+
dev = [
|
|
79
|
+
"httpx>=0.27",
|
|
80
|
+
"mcp>=1.0",
|
|
81
|
+
"mypy>=1.19.1",
|
|
82
|
+
"pytest>=9.0.2",
|
|
83
|
+
"rich>=13.0",
|
|
84
|
+
"ruff>=0.15.4",
|
|
85
|
+
"typer>=0.15",
|
|
86
|
+
]
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""HTTP API client for planefyi.com REST endpoints.
|
|
2
|
+
|
|
3
|
+
Requires the ``api`` extra: ``pip install planefyi[api]``
|
|
4
|
+
|
|
5
|
+
Usage::
|
|
6
|
+
|
|
7
|
+
from planefyi.api import PlaneFYI
|
|
8
|
+
|
|
9
|
+
with PlaneFYI() as api:
|
|
10
|
+
results = api.search("747")
|
|
11
|
+
print(results)
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
from typing import Any
|
|
17
|
+
|
|
18
|
+
import httpx
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class PlaneFYI:
|
|
22
|
+
"""API client for the planefyi.com REST API.
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
base_url: API base URL. Defaults to ``https://planefyi.com``.
|
|
26
|
+
timeout: Request timeout in seconds. Defaults to ``10.0``.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
def __init__(
|
|
30
|
+
self,
|
|
31
|
+
base_url: str = "https://planefyi.com",
|
|
32
|
+
timeout: float = 10.0,
|
|
33
|
+
) -> None:
|
|
34
|
+
self._client = httpx.Client(base_url=base_url, timeout=timeout)
|
|
35
|
+
|
|
36
|
+
def _get(self, path: str, **params: Any) -> dict[str, Any]:
|
|
37
|
+
resp = self._client.get(path, params={k: v for k, v in params.items() if v is not None})
|
|
38
|
+
resp.raise_for_status()
|
|
39
|
+
result: dict[str, Any] = resp.json()
|
|
40
|
+
return result
|
|
41
|
+
|
|
42
|
+
def search(self, query: str) -> dict[str, Any]:
|
|
43
|
+
"""Search across all content.
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
query: Search term (e.g. ``"747"``).
|
|
47
|
+
"""
|
|
48
|
+
return self._get("/api/search/", q=query)
|
|
49
|
+
|
|
50
|
+
def close(self) -> None:
|
|
51
|
+
"""Close the underlying HTTP connection."""
|
|
52
|
+
self._client.close()
|
|
53
|
+
|
|
54
|
+
def __enter__(self) -> PlaneFYI:
|
|
55
|
+
return self
|
|
56
|
+
|
|
57
|
+
def __exit__(self, *_: object) -> None:
|
|
58
|
+
self.close()
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Command-line interface for planefyi."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
|
|
7
|
+
import typer
|
|
8
|
+
|
|
9
|
+
from planefyi.api import PlaneFYI
|
|
10
|
+
|
|
11
|
+
app = typer.Typer(help="PlaneFYI — Aircraft models and specifications API client.")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@app.command()
|
|
15
|
+
def search(query: str) -> None:
|
|
16
|
+
"""Search planefyi.com."""
|
|
17
|
+
with PlaneFYI() as api:
|
|
18
|
+
result = api.search(query)
|
|
19
|
+
typer.echo(json.dumps(result, indent=2))
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""MCP server for planefyi."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from mcp.server.fastmcp import FastMCP
|
|
8
|
+
|
|
9
|
+
from planefyi.api import PlaneFYI
|
|
10
|
+
|
|
11
|
+
mcp = FastMCP("planefyi")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@mcp.tool()
|
|
15
|
+
def search_planefyi(query: str) -> dict[str, Any]:
|
|
16
|
+
"""Search planefyi.com for content matching the query."""
|
|
17
|
+
with PlaneFYI() as api:
|
|
18
|
+
return api.search(query)
|
|
File without changes
|
|
File without changes
|