auto-rest-api 0.1.0__py3-none-any.whl
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.
Potentially problematic release.
This version of auto-rest-api might be problematic. Click here for more details.
- auto_rest/__init__.py +3 -0
- auto_rest/__main__.py +93 -0
- auto_rest/cli.py +127 -0
- auto_rest/handlers.py +362 -0
- auto_rest/models.py +228 -0
- auto_rest/params.py +147 -0
- auto_rest/queries.py +107 -0
- auto_rest/routers.py +168 -0
- auto_rest_api-0.1.0.dist-info/LICENSE.md +675 -0
- auto_rest_api-0.1.0.dist-info/METADATA +86 -0
- auto_rest_api-0.1.0.dist-info/RECORD +13 -0
- auto_rest_api-0.1.0.dist-info/WHEEL +4 -0
- auto_rest_api-0.1.0.dist-info/entry_points.txt +3 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: auto-rest-api
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Automatically map database schemas and deploy per-table REST API endpoints.
|
|
5
|
+
License: GPL-3.0-only
|
|
6
|
+
Keywords: Better,HPC,automatic,rest,api
|
|
7
|
+
Author: Better HPC LLC
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Classifier: Environment :: Web Environment
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Intended Audience :: Information Technology
|
|
12
|
+
Classifier: Intended Audience :: System Administrators
|
|
13
|
+
Classifier: Natural Language :: English
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python
|
|
16
|
+
Classifier: Topic :: Internet
|
|
17
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
18
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
|
|
19
|
+
Classifier: Topic :: Software Development
|
|
20
|
+
Classifier: Typing :: Typed
|
|
21
|
+
Requires-Dist: aiomysql (>=0.2,<1.0)
|
|
22
|
+
Requires-Dist: aioodbc (>=0.5,<1.0)
|
|
23
|
+
Requires-Dist: aiosqlite (>=0.20,<1.0)
|
|
24
|
+
Requires-Dist: asyncpg (>=0.30,<1.0)
|
|
25
|
+
Requires-Dist: fastapi (>=0.115,<1.0)
|
|
26
|
+
Requires-Dist: greenlet (>=3.1,<4.0)
|
|
27
|
+
Requires-Dist: httpx (>=0.28,<1.0)
|
|
28
|
+
Requires-Dist: oracledb (>=2.5,<3.0)
|
|
29
|
+
Requires-Dist: pydantic (>=2.10,<3.0)
|
|
30
|
+
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
|
|
31
|
+
Requires-Dist: sqlalchemy (>=2.0,<3.0)
|
|
32
|
+
Requires-Dist: uvicorn (>=0.34,<1.0)
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
|
|
35
|
+
# Auto-REST
|
|
36
|
+
|
|
37
|
+
A command line tool for deploying dynamically generated REST APIs against relational databases.
|
|
38
|
+
See the [project documentation](https://better-hpc.github.io/auto-rest/) for detailed usage instructions.
|
|
39
|
+
|
|
40
|
+
## Supported Databases
|
|
41
|
+
|
|
42
|
+
Auto-REST provides built-in support for the database types listed below.
|
|
43
|
+
Support for additional databases can be added by installing the corresponding database drivers.
|
|
44
|
+
See the official documentation for instructions.
|
|
45
|
+
|
|
46
|
+
| Flag | Default Driver | Database Type |
|
|
47
|
+
|------------|------------------------------|----------------------|
|
|
48
|
+
| `--sqlite` | `sqlite+aiosqlite` | SQLite |
|
|
49
|
+
| `--psql` | `postgresql+asyncpg` | PostgreSQL |
|
|
50
|
+
| `--mysql` | `mysql+asyncmy` | MySQL |
|
|
51
|
+
| `--oracle` | `oracle+oracledb` | Oracle |
|
|
52
|
+
| `--mssql` | `mssql+aiomysql` | Microsoft SQL Server |
|
|
53
|
+
| `--driver` | Custom driver (user-defined) | Custom |
|
|
54
|
+
|
|
55
|
+
## Quickstart
|
|
56
|
+
|
|
57
|
+
Install the command line utility using your favorite Python package manager.
|
|
58
|
+
|
|
59
|
+
```shell
|
|
60
|
+
pipx install auto-rest-api
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Check the package installed correctly.
|
|
64
|
+
|
|
65
|
+
```shell
|
|
66
|
+
auto-rest --help
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Launch an API by providing connection arguments to a database of your choice.
|
|
70
|
+
|
|
71
|
+
```shell
|
|
72
|
+
auto-rest \
|
|
73
|
+
# Enable optional endpoints / functionality
|
|
74
|
+
--enable-docs \
|
|
75
|
+
--enable-write \
|
|
76
|
+
# Define the database type and connection arguments
|
|
77
|
+
--psql
|
|
78
|
+
--db-host localhost
|
|
79
|
+
--db-port 5432
|
|
80
|
+
--db-name default
|
|
81
|
+
--db-user jsmith
|
|
82
|
+
--db-password secure123!
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Navigate `localhost:8081/docs/` to view the OpenAPI documentation for your dynamically generated REST API!
|
|
86
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
auto_rest/__init__.py,sha256=9ICmv2urSoAo856FJylKdorF19UsUGc4eyORYLptf1Q,69
|
|
2
|
+
auto_rest/__main__.py,sha256=RK3SuyGrWmXAjWZfZZJs-FP9srqjgdzhm86MuBucOok,3197
|
|
3
|
+
auto_rest/cli.py,sha256=A7-kMTNNzqZB7jTUJBAVqfYm9RyYjENr0g_vK9JE0N4,5199
|
|
4
|
+
auto_rest/handlers.py,sha256=0nj3radoT0V2bCSmb5gBuWyu1CtUgSQ_NU0typ8zKBA,11827
|
|
5
|
+
auto_rest/models.py,sha256=XfzBdfnjQCXmcQBOYsC7OsZ69EBCKlANrcPnO5Tj8fQ,6882
|
|
6
|
+
auto_rest/params.py,sha256=f5gIeCIlzvy70IgtfJ96Krohf44AySwR5k-b1DYeIXw,4953
|
|
7
|
+
auto_rest/queries.py,sha256=GzoCtxRPn9UJ7cnhYuPc8wZFppbqe7ykSlnesfWSr94,2926
|
|
8
|
+
auto_rest/routers.py,sha256=VzGPEwJe8GqLly751EWIru_LwjB7R9t1z9OPoYitc9I,5431
|
|
9
|
+
auto_rest_api-0.1.0.dist-info/LICENSE.md,sha256=zFRw_u1mGSOH8GrpOu0L1P765aX9fB5UpKz06mTxAos,34893
|
|
10
|
+
auto_rest_api-0.1.0.dist-info/METADATA,sha256=tvb1bdogwjEIf8e6XQYuvRY65ZCfrKNInbQBKmkR8cc,2951
|
|
11
|
+
auto_rest_api-0.1.0.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
|
12
|
+
auto_rest_api-0.1.0.dist-info/entry_points.txt,sha256=zFynmBrHyYo3Ds0Uo4-bTFe1Tdr5mIXV4dPQOFb-W1w,53
|
|
13
|
+
auto_rest_api-0.1.0.dist-info/RECORD,,
|