tiny-ca 0.2.0__tar.gz → 0.2.1__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.
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/LICENSE +1 -1
- {tiny_ca-0.2.0/tiny_ca.egg-info → tiny_ca-0.2.1}/PKG-INFO +41 -3
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/README.md +40 -2
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/pyproject.toml +43 -20
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/__init__.py +1 -1
- {tiny_ca-0.2.0 → tiny_ca-0.2.1/tiny_ca.egg-info}/PKG-INFO +41 -3
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca.egg-info/top_level.txt +1 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/docs/source/conf.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/setup.cfg +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tests/test_afile_loader.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tests/test_async_db_handler.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tests/test_async_lifecycle_manager.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tests/test_async_local_storage.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tests/test_base_db.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tests/test_base_storage.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tests/test_database_manager.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tests/test_db_const.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tests/test_factory.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tests/test_file_loader.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tests/test_life_time.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tests/test_local_storage.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tests/test_models.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tests/test_serial.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tests/test_serial_generator.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tests/test_storage_const.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tests/test_sync_db_manager.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tests/test_sync_lifecycle_manager.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/ca_factory/__init__.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/ca_factory/factory.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/ca_factory/utils/__init__.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/ca_factory/utils/afile_loader.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/ca_factory/utils/file_loader.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/ca_factory/utils/life_time.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/ca_factory/utils/serial.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/const.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/db/__init__.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/db/async_db_manager.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/db/base_db.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/db/const.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/db/models.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/db/sync_db_manager.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/exc.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/managers/__init__.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/managers/async_lifecycle_manager.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/managers/sync_lifecycle_manager.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/models/__init__.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/models/certificate.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/settings.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/storage/__init__.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/storage/async_local_storage.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/storage/base_storage.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/storage/const.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/storage/local_storage.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/utils/__init__.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca/utils/serial_generator.py +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca.egg-info/SOURCES.txt +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca.egg-info/dependency_links.txt +0 -0
- {tiny_ca-0.2.0 → tiny_ca-0.2.1}/tiny_ca.egg-info/requires.txt +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tiny-ca
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: A lightweight, 100%-tested Python library for managing the full lifecycle of X.509 certificates — issuance, revocation, rotation, CRL generation, PKCS#12 export, and more.
|
|
5
5
|
Author-email: Denis Shchutskyi <denisshchutskyi@gmail.com>
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Repository, https://github.com/Shchusia/tiny_ca
|
|
8
8
|
Project-URL: Documentation, https://shchusia.github.io/tiny_ca/
|
|
9
9
|
Project-URL: Bug Tracker, https://github.com/Shchusia/tiny_ca/issues
|
|
10
|
-
Project-URL: Changelog, https://github.com/Shchusia/tiny_ca/blob/
|
|
10
|
+
Project-URL: Changelog, https://github.com/Shchusia/tiny_ca/blob/master/CHANGELOG.md
|
|
11
11
|
Keywords: pki,x509,certificate,ca,tls,ssl,cryptography,crl,pkcs12
|
|
12
12
|
Classifier: License :: OSI Approved :: MIT License
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -42,8 +42,9 @@ Dynamic: license-file
|
|
|
42
42
|
|
|
43
43
|
# tiny_ca
|
|
44
44
|
|
|
45
|
-
[](https://pypi.org/project/tiny-ca/)
|
|
46
46
|
[](https://pypi.org/project/tiny-ca/)
|
|
47
|
+
|
|
47
48
|
[](https://coveralls.io/github/Shchusia/tiny_ca?branch=feature/docs)
|
|
48
49
|
[](https://shchusia.github.io/tiny_ca/)
|
|
49
50
|
[](LICENSE)
|
|
@@ -52,6 +53,43 @@ A lightweight, **100%-tested** Python library for managing the full lifecycle of
|
|
|
52
53
|
|
|
53
54
|
---
|
|
54
55
|
|
|
56
|
+
## REST API
|
|
57
|
+
|
|
58
|
+
> Looking for a ready-to-use HTTP server built on **tiny-ca**?
|
|
59
|
+
> Check out **[tiny-ca-gateway](https://github.com/Shchusia/tiny-ca-gateway)** — a framework-agnostic REST API adapter that exposes all 22 certificate lifecycle endpoints with no extra code.
|
|
60
|
+
|
|
61
|
+
| | |
|
|
62
|
+
|---|---|
|
|
63
|
+
| **GitHub** | [github.com/Shchusia/tiny-ca-gateway](https://github.com/Shchusia/tiny-ca-gateway) |
|
|
64
|
+
| **Integration guide** | [tiny-ca-gateway/blob/master/README.md](https://github.com/Shchusia/tiny-ca-gateway/blob/master/README.md) |
|
|
65
|
+
| **Supported frameworks** | FastAPI · Flask · aiohttp · Django Ninja |
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
pip install "tiny-ca-gateway[fastapi]" # FastAPI + Uvicorn
|
|
69
|
+
pip install "tiny-ca-gateway[flask]" # Flask + Gunicorn
|
|
70
|
+
pip install "tiny-ca-gateway[aiohttp]" # aiohttp
|
|
71
|
+
pip install "tiny-ca-gateway[django]" # Django + Django Ninja
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
# FastAPI — all 22 CA endpoints in 5 lines
|
|
76
|
+
from fastapi import FastAPI
|
|
77
|
+
from contextlib import asynccontextmanager
|
|
78
|
+
from tiny_ca_gateway.fastapi.lifespan.manager import FastAPILifespanManager
|
|
79
|
+
from tiny_ca_gateway.fastapi.api.v1.ca_routes import router
|
|
80
|
+
|
|
81
|
+
@asynccontextmanager
|
|
82
|
+
async def lifespan(app: FastAPI):
|
|
83
|
+
await FastAPILifespanManager(common_name="My CA").on_startup()
|
|
84
|
+
yield
|
|
85
|
+
|
|
86
|
+
app = FastAPI(lifespan=lifespan)
|
|
87
|
+
app.include_router(router, prefix="/api/v1")
|
|
88
|
+
# → Swagger UI at http://localhost:8000/docs
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
55
93
|
## Table of Contents
|
|
56
94
|
|
|
57
95
|
- [Features](#features)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# tiny_ca
|
|
2
2
|
|
|
3
|
-
[](https://pypi.org/project/tiny-ca/)
|
|
4
4
|
[](https://pypi.org/project/tiny-ca/)
|
|
5
|
+
|
|
5
6
|
[](https://coveralls.io/github/Shchusia/tiny_ca?branch=feature/docs)
|
|
6
7
|
[](https://shchusia.github.io/tiny_ca/)
|
|
7
8
|
[](LICENSE)
|
|
@@ -10,6 +11,43 @@ A lightweight, **100%-tested** Python library for managing the full lifecycle of
|
|
|
10
11
|
|
|
11
12
|
---
|
|
12
13
|
|
|
14
|
+
## REST API
|
|
15
|
+
|
|
16
|
+
> Looking for a ready-to-use HTTP server built on **tiny-ca**?
|
|
17
|
+
> Check out **[tiny-ca-gateway](https://github.com/Shchusia/tiny-ca-gateway)** — a framework-agnostic REST API adapter that exposes all 22 certificate lifecycle endpoints with no extra code.
|
|
18
|
+
|
|
19
|
+
| | |
|
|
20
|
+
|---|---|
|
|
21
|
+
| **GitHub** | [github.com/Shchusia/tiny-ca-gateway](https://github.com/Shchusia/tiny-ca-gateway) |
|
|
22
|
+
| **Integration guide** | [tiny-ca-gateway/blob/master/README.md](https://github.com/Shchusia/tiny-ca-gateway/blob/master/README.md) |
|
|
23
|
+
| **Supported frameworks** | FastAPI · Flask · aiohttp · Django Ninja |
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install "tiny-ca-gateway[fastapi]" # FastAPI + Uvicorn
|
|
27
|
+
pip install "tiny-ca-gateway[flask]" # Flask + Gunicorn
|
|
28
|
+
pip install "tiny-ca-gateway[aiohttp]" # aiohttp
|
|
29
|
+
pip install "tiny-ca-gateway[django]" # Django + Django Ninja
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
# FastAPI — all 22 CA endpoints in 5 lines
|
|
34
|
+
from fastapi import FastAPI
|
|
35
|
+
from contextlib import asynccontextmanager
|
|
36
|
+
from tiny_ca_gateway.fastapi.lifespan.manager import FastAPILifespanManager
|
|
37
|
+
from tiny_ca_gateway.fastapi.api.v1.ca_routes import router
|
|
38
|
+
|
|
39
|
+
@asynccontextmanager
|
|
40
|
+
async def lifespan(app: FastAPI):
|
|
41
|
+
await FastAPILifespanManager(common_name="My CA").on_startup()
|
|
42
|
+
yield
|
|
43
|
+
|
|
44
|
+
app = FastAPI(lifespan=lifespan)
|
|
45
|
+
app.include_router(router, prefix="/api/v1")
|
|
46
|
+
# → Swagger UI at http://localhost:8000/docs
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
13
51
|
## Table of Contents
|
|
14
52
|
|
|
15
53
|
- [Features](#features)
|
|
@@ -544,4 +582,4 @@ Do **not** open public issues for security vulnerabilities. Email the maintainer
|
|
|
544
582
|
| SQLAlchemy | MIT |
|
|
545
583
|
| Pydantic | MIT |
|
|
546
584
|
| aiosqlite | MIT |
|
|
547
|
-
| aiofiles | Apache 2.0 |
|
|
585
|
+
| aiofiles | Apache 2.0 |
|
|
@@ -10,7 +10,7 @@ build-backend = "setuptools.build_meta"
|
|
|
10
10
|
# ──────────────────────────────────────────────
|
|
11
11
|
[project]
|
|
12
12
|
name = "tiny-ca"
|
|
13
|
-
version = "0.2.
|
|
13
|
+
version = "0.2.1"
|
|
14
14
|
description = "A lightweight, 100%-tested Python library for managing the full lifecycle of X.509 certificates — issuance, revocation, rotation, CRL generation, PKCS#12 export, and more."
|
|
15
15
|
readme = "README.md"
|
|
16
16
|
requires-python = ">=3.11"
|
|
@@ -38,10 +38,10 @@ dependencies = [
|
|
|
38
38
|
]
|
|
39
39
|
|
|
40
40
|
[project.urls]
|
|
41
|
-
Repository
|
|
41
|
+
Repository = "https://github.com/Shchusia/tiny_ca"
|
|
42
42
|
Documentation = "https://shchusia.github.io/tiny_ca/"
|
|
43
43
|
"Bug Tracker" = "https://github.com/Shchusia/tiny_ca/issues"
|
|
44
|
-
Changelog
|
|
44
|
+
Changelog = "https://github.com/Shchusia/tiny_ca/blob/master/CHANGELOG.md"
|
|
45
45
|
|
|
46
46
|
# ──────────────────────────────────────────────
|
|
47
47
|
# Optional extras
|
|
@@ -111,36 +111,34 @@ source-include = ["LICENSE"]
|
|
|
111
111
|
[tool.setuptools.packages.find]
|
|
112
112
|
exclude = ["certs*", "tests*", "examples*"]
|
|
113
113
|
|
|
114
|
-
# ──────────────────────────────────────────────
|
|
115
|
-
# Black
|
|
116
|
-
# ──────────────────────────────────────────────
|
|
117
114
|
[tool.black]
|
|
118
115
|
line-length = 88
|
|
119
116
|
target-version = ["py311", "py312"]
|
|
120
117
|
|
|
121
|
-
# ──────────────────────────────────────────────
|
|
122
|
-
# Ruff
|
|
123
|
-
# ──────────────────────────────────────────────
|
|
124
118
|
[tool.ruff]
|
|
125
119
|
target-version = "py311"
|
|
126
120
|
line-length = 88
|
|
127
121
|
exclude = [
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
122
|
+
".git",
|
|
123
|
+
".venv",
|
|
124
|
+
"__pycache__",
|
|
125
|
+
"build",
|
|
126
|
+
"dist",
|
|
127
|
+
"migrations",
|
|
134
128
|
]
|
|
135
129
|
|
|
136
130
|
[tool.ruff.lint]
|
|
137
131
|
select = ["E", "W", "F", "I", "UP", "B", "C4", "SIM"]
|
|
138
|
-
ignore = [
|
|
132
|
+
ignore = [
|
|
133
|
+
"E501",
|
|
134
|
+
"B008",
|
|
135
|
+
"F401",
|
|
136
|
+
]
|
|
139
137
|
fixable = ["ALL"]
|
|
140
138
|
unfixable = []
|
|
141
139
|
|
|
142
140
|
[tool.ruff.lint.isort]
|
|
143
|
-
known-first-party = ["
|
|
141
|
+
known-first-party = ["your_package"]
|
|
144
142
|
force-sort-within-sections = true
|
|
145
143
|
|
|
146
144
|
[tool.ruff.lint.per-file-ignores]
|
|
@@ -152,29 +150,54 @@ quote-style = "double"
|
|
|
152
150
|
indent-style = "space"
|
|
153
151
|
line-ending = "auto"
|
|
154
152
|
|
|
153
|
+
|
|
155
154
|
# ──────────────────────────────────────────────
|
|
156
155
|
# Mypy
|
|
157
156
|
# ──────────────────────────────────────────────
|
|
158
157
|
[tool.mypy]
|
|
159
158
|
python_version = "3.11"
|
|
160
159
|
strict = true
|
|
160
|
+
disallow_untyped_calls = true
|
|
161
161
|
show_error_codes = true
|
|
162
162
|
show_column_numbers = true
|
|
163
163
|
pretty = true
|
|
164
164
|
warn_unreachable = true
|
|
165
165
|
warn_return_any = true
|
|
166
|
-
|
|
166
|
+
disallow_incomplete_defs = true
|
|
167
167
|
no_implicit_optional = true
|
|
168
168
|
strict_equality = true
|
|
169
169
|
ignore_missing_imports = true
|
|
170
|
+
check_untyped_defs = true
|
|
171
|
+
no_strict_optional = true
|
|
172
|
+
warn_unused_ignores = false
|
|
173
|
+
disallow_subclassing_any = false
|
|
174
|
+
disallow_untyped_defs = true
|
|
175
|
+
warn_redundant_casts=true
|
|
176
|
+
plugins = ["pydantic.mypy"]
|
|
177
|
+
exclude = "migrations/"
|
|
178
|
+
disable_error_code = ["untyped-decorator"]
|
|
170
179
|
|
|
171
180
|
[[tool.mypy.overrides]]
|
|
172
|
-
module = "
|
|
181
|
+
module = "*"
|
|
182
|
+
disallow_untyped_calls = true
|
|
183
|
+
disallow_untyped_defs = true
|
|
184
|
+
check_untyped_defs = true
|
|
185
|
+
warn_return_any = true
|
|
186
|
+
no_implicit_optional = true
|
|
187
|
+
strict_optional = true
|
|
173
188
|
ignore_missing_imports = true
|
|
174
189
|
|
|
190
|
+
|
|
191
|
+
[tool.bandit.assert_used]
|
|
192
|
+
exclude_dirs = ["venv", "tests"]
|
|
193
|
+
exclude = ["/tests", "/venv"]
|
|
194
|
+
nosec = ["B608"]
|
|
195
|
+
skips = ["*/*_test.py", "*/test_*.py", "*/grafana.py", "B608"]
|
|
196
|
+
|
|
197
|
+
|
|
175
198
|
# ──────────────────────────────────────────────
|
|
176
199
|
# Pytest
|
|
177
200
|
# ──────────────────────────────────────────────
|
|
178
201
|
[tool.pytest.ini_options]
|
|
179
202
|
pythonpath = ["."]
|
|
180
|
-
testpaths = ["tests"]
|
|
203
|
+
testpaths = ["tests"]
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tiny-ca
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: A lightweight, 100%-tested Python library for managing the full lifecycle of X.509 certificates — issuance, revocation, rotation, CRL generation, PKCS#12 export, and more.
|
|
5
5
|
Author-email: Denis Shchutskyi <denisshchutskyi@gmail.com>
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Repository, https://github.com/Shchusia/tiny_ca
|
|
8
8
|
Project-URL: Documentation, https://shchusia.github.io/tiny_ca/
|
|
9
9
|
Project-URL: Bug Tracker, https://github.com/Shchusia/tiny_ca/issues
|
|
10
|
-
Project-URL: Changelog, https://github.com/Shchusia/tiny_ca/blob/
|
|
10
|
+
Project-URL: Changelog, https://github.com/Shchusia/tiny_ca/blob/master/CHANGELOG.md
|
|
11
11
|
Keywords: pki,x509,certificate,ca,tls,ssl,cryptography,crl,pkcs12
|
|
12
12
|
Classifier: License :: OSI Approved :: MIT License
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -42,8 +42,9 @@ Dynamic: license-file
|
|
|
42
42
|
|
|
43
43
|
# tiny_ca
|
|
44
44
|
|
|
45
|
-
[](https://pypi.org/project/tiny-ca/)
|
|
46
46
|
[](https://pypi.org/project/tiny-ca/)
|
|
47
|
+
|
|
47
48
|
[](https://coveralls.io/github/Shchusia/tiny_ca?branch=feature/docs)
|
|
48
49
|
[](https://shchusia.github.io/tiny_ca/)
|
|
49
50
|
[](LICENSE)
|
|
@@ -52,6 +53,43 @@ A lightweight, **100%-tested** Python library for managing the full lifecycle of
|
|
|
52
53
|
|
|
53
54
|
---
|
|
54
55
|
|
|
56
|
+
## REST API
|
|
57
|
+
|
|
58
|
+
> Looking for a ready-to-use HTTP server built on **tiny-ca**?
|
|
59
|
+
> Check out **[tiny-ca-gateway](https://github.com/Shchusia/tiny-ca-gateway)** — a framework-agnostic REST API adapter that exposes all 22 certificate lifecycle endpoints with no extra code.
|
|
60
|
+
|
|
61
|
+
| | |
|
|
62
|
+
|---|---|
|
|
63
|
+
| **GitHub** | [github.com/Shchusia/tiny-ca-gateway](https://github.com/Shchusia/tiny-ca-gateway) |
|
|
64
|
+
| **Integration guide** | [tiny-ca-gateway/blob/master/README.md](https://github.com/Shchusia/tiny-ca-gateway/blob/master/README.md) |
|
|
65
|
+
| **Supported frameworks** | FastAPI · Flask · aiohttp · Django Ninja |
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
pip install "tiny-ca-gateway[fastapi]" # FastAPI + Uvicorn
|
|
69
|
+
pip install "tiny-ca-gateway[flask]" # Flask + Gunicorn
|
|
70
|
+
pip install "tiny-ca-gateway[aiohttp]" # aiohttp
|
|
71
|
+
pip install "tiny-ca-gateway[django]" # Django + Django Ninja
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
# FastAPI — all 22 CA endpoints in 5 lines
|
|
76
|
+
from fastapi import FastAPI
|
|
77
|
+
from contextlib import asynccontextmanager
|
|
78
|
+
from tiny_ca_gateway.fastapi.lifespan.manager import FastAPILifespanManager
|
|
79
|
+
from tiny_ca_gateway.fastapi.api.v1.ca_routes import router
|
|
80
|
+
|
|
81
|
+
@asynccontextmanager
|
|
82
|
+
async def lifespan(app: FastAPI):
|
|
83
|
+
await FastAPILifespanManager(common_name="My CA").on_startup()
|
|
84
|
+
yield
|
|
85
|
+
|
|
86
|
+
app = FastAPI(lifespan=lifespan)
|
|
87
|
+
app.include_router(router, prefix="/api/v1")
|
|
88
|
+
# → Swagger UI at http://localhost:8000/docs
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
55
93
|
## Table of Contents
|
|
56
94
|
|
|
57
95
|
- [Features](#features)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|