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.
- forge_kits-0.1.0/.github/workflows/ci.yml +80 -0
- forge_kits-0.1.0/.github/workflows/publish.yml +30 -0
- forge_kits-0.1.0/.gitignore +6 -0
- forge_kits-0.1.0/PKG-INFO +1233 -0
- forge_kits-0.1.0/README.md +1205 -0
- forge_kits-0.1.0/forgeapi/__init__.py +61 -0
- forge_kits-0.1.0/forgeapi/auth/__init__.py +42 -0
- forge_kits-0.1.0/forgeapi/auth/backend.py +186 -0
- forge_kits-0.1.0/forgeapi/auth/models.py +18 -0
- forge_kits-0.1.0/forgeapi/auth/strategies/__init__.py +6 -0
- forge_kits-0.1.0/forgeapi/auth/strategies/base.py +21 -0
- forge_kits-0.1.0/forgeapi/auth/strategies/cookie.py +169 -0
- forge_kits-0.1.0/forgeapi/auth/strategies/jwt.py +157 -0
- forge_kits-0.1.0/forgeapi/auth/strategies/telegram.py +139 -0
- forge_kits-0.1.0/forgeapi/cli/__init__.py +3 -0
- forge_kits-0.1.0/forgeapi/cli/commands/__init__.py +0 -0
- forge_kits-0.1.0/forgeapi/cli/commands/boilerplate_cmd.py +689 -0
- forge_kits-0.1.0/forgeapi/cli/commands/db_cmd.py +28 -0
- forge_kits-0.1.0/forgeapi/cli/commands/fresh_cmd.py +81 -0
- forge_kits-0.1.0/forgeapi/cli/commands/generate_cmd.py +277 -0
- forge_kits-0.1.0/forgeapi/cli/commands/generate_schema_cmd.py +321 -0
- forge_kits-0.1.0/forgeapi/cli/commands/init_cmd.py +312 -0
- forge_kits-0.1.0/forgeapi/cli/commands/models_cmd.py +70 -0
- forge_kits-0.1.0/forgeapi/cli/commands/routers_cmd.py +77 -0
- forge_kits-0.1.0/forgeapi/cli/commands/runserver_cmd.py +43 -0
- forge_kits-0.1.0/forgeapi/cli/commands/seed_cmd.py +115 -0
- forge_kits-0.1.0/forgeapi/cli/main.py +402 -0
- forge_kits-0.1.0/forgeapi/cli/templates/controller.py.jinja2 +16 -0
- forge_kits-0.1.0/forgeapi/cli/templates/event.py.jinja2 +8 -0
- forge_kits-0.1.0/forgeapi/cli/templates/listener.py.jinja2 +7 -0
- forge_kits-0.1.0/forgeapi/cli/templates/model.py.jinja2 +11 -0
- forge_kits-0.1.0/forgeapi/cli/templates/schema.py.jinja2 +13 -0
- forge_kits-0.1.0/forgeapi/cli/templates/seeder.py.jinja2 +6 -0
- forge_kits-0.1.0/forgeapi/config.py +63 -0
- forge_kits-0.1.0/forgeapi/controllers/__init__.py +3 -0
- forge_kits-0.1.0/forgeapi/controllers/base.py +99 -0
- forge_kits-0.1.0/forgeapi/database/__init__.py +3 -0
- forge_kits-0.1.0/forgeapi/database/seeder.py +26 -0
- forge_kits-0.1.0/forgeapi/events/__init__.py +5 -0
- forge_kits-0.1.0/forgeapi/events/bus.py +185 -0
- forge_kits-0.1.0/forgeapi/events/decorators.py +53 -0
- forge_kits-0.1.0/forgeapi/events/event.py +61 -0
- forge_kits-0.1.0/forgeapi/kit.py +256 -0
- forge_kits-0.1.0/forgeapi/middleware/__init__.py +15 -0
- forge_kits-0.1.0/forgeapi/middleware/base_middleware.py +42 -0
- forge_kits-0.1.0/forgeapi/middleware/cors.py +18 -0
- forge_kits-0.1.0/forgeapi/middleware/guard.py +61 -0
- forge_kits-0.1.0/forgeapi/middleware/logging.py +26 -0
- forge_kits-0.1.0/forgeapi/middleware/rate_limit.py +37 -0
- forge_kits-0.1.0/forgeapi/middleware/request_id.py +14 -0
- forge_kits-0.1.0/forgeapi/pagination/__init__.py +3 -0
- forge_kits-0.1.0/forgeapi/pagination/paginator.py +77 -0
- forge_kits-0.1.0/forgeapi/permissions/__init__.py +14 -0
- forge_kits-0.1.0/forgeapi/permissions/dependencies.py +66 -0
- forge_kits-0.1.0/forgeapi/permissions/mixins.py +178 -0
- forge_kits-0.1.0/forgeapi/permissions/models.py +96 -0
- forge_kits-0.1.0/forgeapi/permissions/registry.py +30 -0
- forge_kits-0.1.0/forgeapi/schemas/__init__.py +3 -0
- forge_kits-0.1.0/forgeapi/schemas/base.py +41 -0
- forge_kits-0.1.0/forgeapi/settings/__init__.py +3 -0
- forge_kits-0.1.0/forgeapi/settings/base.py +28 -0
- forge_kits-0.1.0/pyproject.toml +36 -0
- 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
|
+
|