fapi-init 0.0.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.
@@ -0,0 +1,40 @@
1
+ Metadata-Version: 2.4
2
+ Name: fapi-init
3
+ Version: 0.0.0
4
+ Summary: Scaffold a production-ready FastAPI project in seconds
5
+ License: MIT
6
+ Project-URL: Homepage, https://github.com/markryangarcia/fapi-init
7
+ Project-URL: Repository, https://github.com/markryangarcia/fapi-init
8
+ Keywords: fastapi,scaffold,generator,cli,boilerplate
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Software Development :: Code Generators
15
+ Requires-Python: >=3.8
16
+ Description-Content-Type: text/markdown
17
+
18
+ # fapi-init
19
+
20
+ Scaffold a production-ready FastAPI project in seconds.
21
+
22
+ ## Install
23
+
24
+ ```bash
25
+ pip install fapi-init
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ ```bash
31
+ fapi-init my-project
32
+ # or scaffold into the current directory
33
+ fapi-init .
34
+ ```
35
+
36
+ The CLI will guide you through selecting a database, ORM, auth provider, Docker support, and more.
37
+
38
+ ## Source
39
+
40
+ Built with Go. Binaries are downloaded from [GitHub Releases](https://github.com/markryangarcia/fapi-init/releases) on first run and cached at `~/.cache/fapi-init`.
@@ -0,0 +1,23 @@
1
+ # fapi-init
2
+
3
+ Scaffold a production-ready FastAPI project in seconds.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pip install fapi-init
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```bash
14
+ fapi-init my-project
15
+ # or scaffold into the current directory
16
+ fapi-init .
17
+ ```
18
+
19
+ The CLI will guide you through selecting a database, ORM, auth provider, Docker support, and more.
20
+
21
+ ## Source
22
+
23
+ Built with Go. Binaries are downloaded from [GitHub Releases](https://github.com/markryangarcia/fapi-init/releases) on first run and cached at `~/.cache/fapi-init`.
@@ -0,0 +1,16 @@
1
+ import sys
2
+ from importlib.metadata import version, PackageNotFoundError
3
+
4
+ try:
5
+ __version__ = version("fapi-init")
6
+ except PackageNotFoundError:
7
+ __version__ = "0.0.0"
8
+
9
+
10
+ def main() -> None:
11
+ from ._binary import ensure_binary
12
+ import subprocess
13
+
14
+ binary = ensure_binary(__version__)
15
+ result = subprocess.run([str(binary)] + sys.argv[1:])
16
+ sys.exit(result.returncode)
@@ -0,0 +1,63 @@
1
+ """Downloads and caches the fapi-init binary from GitHub Releases."""
2
+
3
+ import os
4
+ import platform
5
+ import stat
6
+ import sys
7
+ import tarfile
8
+ import urllib.request
9
+ import zipfile
10
+ from pathlib import Path
11
+
12
+ GITHUB_REPO = "markryangarcia/fapi-init"
13
+ BIN_NAME = "fapi-init"
14
+ CACHE_DIR = Path.home() / ".cache" / "fapi-init"
15
+
16
+
17
+ def _platform_asset() -> str:
18
+ system = platform.system().lower()
19
+ machine = platform.machine().lower()
20
+
21
+ arch = "arm64" if machine in ("arm64", "aarch64") else "amd64"
22
+
23
+ if system == "darwin":
24
+ return f"fapi-init_darwin_{arch}.tar.gz"
25
+ elif system == "linux":
26
+ return f"fapi-init_linux_{arch}.tar.gz"
27
+ elif system == "windows":
28
+ return f"fapi-init_windows_{arch}.zip"
29
+ else:
30
+ raise RuntimeError(f"Unsupported platform: {system}/{machine}")
31
+
32
+
33
+ def _bin_path(version: str) -> Path:
34
+ suffix = ".exe" if platform.system().lower() == "windows" else ""
35
+ return CACHE_DIR / version / (BIN_NAME + suffix)
36
+
37
+
38
+ def ensure_binary(version: str) -> Path:
39
+ bin_path = _bin_path(version)
40
+ if bin_path.exists():
41
+ return bin_path
42
+
43
+ asset = _platform_asset()
44
+ url = f"https://github.com/{GITHUB_REPO}/releases/download/v{version}/{asset}"
45
+
46
+ bin_path.parent.mkdir(parents=True, exist_ok=True)
47
+
48
+ archive_path = bin_path.parent / asset
49
+ print(f"Downloading fapi-init v{version}...", file=sys.stderr)
50
+ urllib.request.urlretrieve(url, archive_path)
51
+
52
+ if asset.endswith(".zip"):
53
+ with zipfile.ZipFile(archive_path) as zf:
54
+ zf.extractall(bin_path.parent)
55
+ else:
56
+ with tarfile.open(archive_path, "r:gz") as tf:
57
+ tf.extractall(bin_path.parent)
58
+
59
+ archive_path.unlink()
60
+
61
+ # ensure executable
62
+ bin_path.chmod(bin_path.stat().st_mode | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH)
63
+ return bin_path
@@ -0,0 +1,40 @@
1
+ Metadata-Version: 2.4
2
+ Name: fapi-init
3
+ Version: 0.0.0
4
+ Summary: Scaffold a production-ready FastAPI project in seconds
5
+ License: MIT
6
+ Project-URL: Homepage, https://github.com/markryangarcia/fapi-init
7
+ Project-URL: Repository, https://github.com/markryangarcia/fapi-init
8
+ Keywords: fastapi,scaffold,generator,cli,boilerplate
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Software Development :: Code Generators
15
+ Requires-Python: >=3.8
16
+ Description-Content-Type: text/markdown
17
+
18
+ # fapi-init
19
+
20
+ Scaffold a production-ready FastAPI project in seconds.
21
+
22
+ ## Install
23
+
24
+ ```bash
25
+ pip install fapi-init
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ ```bash
31
+ fapi-init my-project
32
+ # or scaffold into the current directory
33
+ fapi-init .
34
+ ```
35
+
36
+ The CLI will guide you through selecting a database, ORM, auth provider, Docker support, and more.
37
+
38
+ ## Source
39
+
40
+ Built with Go. Binaries are downloaded from [GitHub Releases](https://github.com/markryangarcia/fapi-init/releases) on first run and cached at `~/.cache/fapi-init`.
@@ -0,0 +1,9 @@
1
+ README.md
2
+ pyproject.toml
3
+ fapi_init/__init__.py
4
+ fapi_init/_binary.py
5
+ fapi_init.egg-info/PKG-INFO
6
+ fapi_init.egg-info/SOURCES.txt
7
+ fapi_init.egg-info/dependency_links.txt
8
+ fapi_init.egg-info/entry_points.txt
9
+ fapi_init.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ fapi-init = fapi_init:main
@@ -0,0 +1 @@
1
+ fapi_init
@@ -0,0 +1,34 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "setuptools-scm"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "fapi-init"
7
+ dynamic = ["version"]
8
+ description = "Scaffold a production-ready FastAPI project in seconds"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.8"
12
+ keywords = ["fastapi", "scaffold", "generator", "cli", "boilerplate"]
13
+ classifiers = [
14
+ "Development Status :: 4 - Beta",
15
+ "Environment :: Console",
16
+ "Intended Audience :: Developers",
17
+ "License :: OSI Approved :: MIT License",
18
+ "Programming Language :: Python :: 3",
19
+ "Topic :: Software Development :: Code Generators",
20
+ ]
21
+
22
+ [project.scripts]
23
+ fapi-init = "fapi_init:main"
24
+
25
+ [project.urls]
26
+ Homepage = "https://github.com/markryangarcia/fapi-init"
27
+ Repository = "https://github.com/markryangarcia/fapi-init"
28
+
29
+ [tool.setuptools.packages.find]
30
+ where = ["."]
31
+ include = ["fapi_init*"]
32
+
33
+ [tool.setuptools_scm]
34
+ root = ".."
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+