forge-kits 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.
Files changed (63) hide show
  1. forge_kits-0.1.0/.github/workflows/ci.yml +80 -0
  2. forge_kits-0.1.0/.github/workflows/publish.yml +30 -0
  3. forge_kits-0.1.0/.gitignore +6 -0
  4. forge_kits-0.1.0/PKG-INFO +1233 -0
  5. forge_kits-0.1.0/README.md +1205 -0
  6. forge_kits-0.1.0/forgeapi/__init__.py +61 -0
  7. forge_kits-0.1.0/forgeapi/auth/__init__.py +42 -0
  8. forge_kits-0.1.0/forgeapi/auth/backend.py +186 -0
  9. forge_kits-0.1.0/forgeapi/auth/models.py +18 -0
  10. forge_kits-0.1.0/forgeapi/auth/strategies/__init__.py +6 -0
  11. forge_kits-0.1.0/forgeapi/auth/strategies/base.py +21 -0
  12. forge_kits-0.1.0/forgeapi/auth/strategies/cookie.py +169 -0
  13. forge_kits-0.1.0/forgeapi/auth/strategies/jwt.py +157 -0
  14. forge_kits-0.1.0/forgeapi/auth/strategies/telegram.py +139 -0
  15. forge_kits-0.1.0/forgeapi/cli/__init__.py +3 -0
  16. forge_kits-0.1.0/forgeapi/cli/commands/__init__.py +0 -0
  17. forge_kits-0.1.0/forgeapi/cli/commands/boilerplate_cmd.py +689 -0
  18. forge_kits-0.1.0/forgeapi/cli/commands/db_cmd.py +28 -0
  19. forge_kits-0.1.0/forgeapi/cli/commands/fresh_cmd.py +81 -0
  20. forge_kits-0.1.0/forgeapi/cli/commands/generate_cmd.py +277 -0
  21. forge_kits-0.1.0/forgeapi/cli/commands/generate_schema_cmd.py +321 -0
  22. forge_kits-0.1.0/forgeapi/cli/commands/init_cmd.py +312 -0
  23. forge_kits-0.1.0/forgeapi/cli/commands/models_cmd.py +70 -0
  24. forge_kits-0.1.0/forgeapi/cli/commands/routers_cmd.py +77 -0
  25. forge_kits-0.1.0/forgeapi/cli/commands/runserver_cmd.py +43 -0
  26. forge_kits-0.1.0/forgeapi/cli/commands/seed_cmd.py +115 -0
  27. forge_kits-0.1.0/forgeapi/cli/main.py +402 -0
  28. forge_kits-0.1.0/forgeapi/cli/templates/controller.py.jinja2 +16 -0
  29. forge_kits-0.1.0/forgeapi/cli/templates/event.py.jinja2 +8 -0
  30. forge_kits-0.1.0/forgeapi/cli/templates/listener.py.jinja2 +7 -0
  31. forge_kits-0.1.0/forgeapi/cli/templates/model.py.jinja2 +11 -0
  32. forge_kits-0.1.0/forgeapi/cli/templates/schema.py.jinja2 +13 -0
  33. forge_kits-0.1.0/forgeapi/cli/templates/seeder.py.jinja2 +6 -0
  34. forge_kits-0.1.0/forgeapi/config.py +63 -0
  35. forge_kits-0.1.0/forgeapi/controllers/__init__.py +3 -0
  36. forge_kits-0.1.0/forgeapi/controllers/base.py +99 -0
  37. forge_kits-0.1.0/forgeapi/database/__init__.py +3 -0
  38. forge_kits-0.1.0/forgeapi/database/seeder.py +26 -0
  39. forge_kits-0.1.0/forgeapi/events/__init__.py +5 -0
  40. forge_kits-0.1.0/forgeapi/events/bus.py +185 -0
  41. forge_kits-0.1.0/forgeapi/events/decorators.py +53 -0
  42. forge_kits-0.1.0/forgeapi/events/event.py +61 -0
  43. forge_kits-0.1.0/forgeapi/kit.py +256 -0
  44. forge_kits-0.1.0/forgeapi/middleware/__init__.py +15 -0
  45. forge_kits-0.1.0/forgeapi/middleware/base_middleware.py +42 -0
  46. forge_kits-0.1.0/forgeapi/middleware/cors.py +18 -0
  47. forge_kits-0.1.0/forgeapi/middleware/guard.py +61 -0
  48. forge_kits-0.1.0/forgeapi/middleware/logging.py +26 -0
  49. forge_kits-0.1.0/forgeapi/middleware/rate_limit.py +37 -0
  50. forge_kits-0.1.0/forgeapi/middleware/request_id.py +14 -0
  51. forge_kits-0.1.0/forgeapi/pagination/__init__.py +3 -0
  52. forge_kits-0.1.0/forgeapi/pagination/paginator.py +77 -0
  53. forge_kits-0.1.0/forgeapi/permissions/__init__.py +14 -0
  54. forge_kits-0.1.0/forgeapi/permissions/dependencies.py +66 -0
  55. forge_kits-0.1.0/forgeapi/permissions/mixins.py +178 -0
  56. forge_kits-0.1.0/forgeapi/permissions/models.py +96 -0
  57. forge_kits-0.1.0/forgeapi/permissions/registry.py +30 -0
  58. forge_kits-0.1.0/forgeapi/schemas/__init__.py +3 -0
  59. forge_kits-0.1.0/forgeapi/schemas/base.py +41 -0
  60. forge_kits-0.1.0/forgeapi/settings/__init__.py +3 -0
  61. forge_kits-0.1.0/forgeapi/settings/base.py +28 -0
  62. forge_kits-0.1.0/pyproject.toml +36 -0
  63. forge_kits-0.1.0/requirements.txt +41 -0
@@ -0,0 +1,80 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ jobs:
10
+ lint:
11
+ name: Lint
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Set up Python
17
+ uses: actions/setup-python@v5
18
+ with:
19
+ python-version: "3.11"
20
+
21
+ - name: Install lint dependencies
22
+ run: |
23
+ python -m pip install --upgrade pip
24
+ pip install ruff || pip install flake8
25
+
26
+ - name: Run ruff (or flake8 fallback)
27
+ run: |
28
+ if command -v ruff &> /dev/null; then
29
+ ruff check .
30
+ else
31
+ flake8 .
32
+ fi
33
+
34
+ test:
35
+ name: Test (Python ${{ matrix.python-version }})
36
+ runs-on: ubuntu-latest
37
+ strategy:
38
+ fail-fast: false
39
+ matrix:
40
+ python-version: ["3.11", "3.13"]
41
+
42
+ steps:
43
+ - uses: actions/checkout@v4
44
+
45
+ - name: Set up Python ${{ matrix.python-version }}
46
+ uses: actions/setup-python@v5
47
+ with:
48
+ python-version: ${{ matrix.python-version }}
49
+
50
+ - name: Install package with all extras
51
+ run: |
52
+ python -m pip install --upgrade pip
53
+ pip install ".[full]"
54
+
55
+ - name: Smoke-test import
56
+ run: python -c "import forgeapi; print('import ok')"
57
+
58
+ build:
59
+ name: Build
60
+ runs-on: ubuntu-latest
61
+ needs: [lint, test]
62
+ steps:
63
+ - uses: actions/checkout@v4
64
+
65
+ - name: Set up Python
66
+ uses: actions/setup-python@v5
67
+ with:
68
+ python-version: "3.11"
69
+
70
+ - name: Build distribution
71
+ run: |
72
+ python -m pip install --upgrade pip
73
+ pip install hatch
74
+ hatch build
75
+
76
+ - name: Upload dist artifact
77
+ uses: actions/upload-artifact@v4
78
+ with:
79
+ name: dist
80
+ path: dist/
@@ -0,0 +1,30 @@
1
+ name: Publish
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ publish:
10
+ name: Publish to PyPI
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - name: Set up Python
16
+ uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.11"
19
+
20
+ - name: Build distribution
21
+ run: |
22
+ python -m pip install --upgrade pip
23
+ pip install hatch
24
+ hatch build
25
+
26
+ - name: Publish to PyPI
27
+ uses: pypa/gh-action-pypi-publish@release/v1
28
+ with:
29
+ password: ${{ secrets.PYPI_API_TOKEN }}
30
+
@@ -0,0 +1,6 @@
1
+ CLAUDE.md
2
+ .venv
3
+ __pycache__
4
+ backend
5
+ .idea
6
+ .claude