https://github.com/better-hpc/auto-rest
Dynamically generate REST APIs for databases.
https://github.com/better-hpc/auto-rest
fast-api python sqlalchemy
Last synced: about 2 months ago
JSON representation
Dynamically generate REST APIs for databases.
- Host: GitHub
- URL: https://github.com/better-hpc/auto-rest
- Owner: Better-HPC
- License: gpl-3.0
- Created: 2024-12-21T12:52:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-05T04:52:34.000Z (about 1 year ago)
- Last Synced: 2025-03-24T12:21:32.839Z (about 1 year ago)
- Topics: fast-api, python, sqlalchemy
- Language: Python
- Homepage: https://better-hpc.github.io/auto-rest/
- Size: 2.12 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: docs/contributing/dev_reference.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Auto-REST
A light-weight CLI tool for deploying dynamically generated REST APIs against relational databases.
See the [project documentation](https://better-hpc.github.io/auto-rest/) for detailed usage instructions.
## Supported Databases
Auto-REST provides built-in support for the database types listed below.
Support for additional databases can be added by installing the corresponding database drivers.
See the official documentation for instructions.
| CLI Flag | Default Driver | Database Type |
|------------|------------------------------|----------------------|
| `--sqlite` | `sqlite+aiosqlite` | SQLite |
| `--psql` | `postgresql+asyncpg` | PostgreSQL |
| `--mysql` | `mysql+asyncmy` | MySQL |
| `--oracle` | `oracle+oracledb` | Oracle |
| `--mssql` | `mssql+aiomysql` | Microsoft SQL Server |
| `--driver` | Custom driver (user-defined) | Custom |
## Quickstart
Install the CLI using your preferred Python package manager:
```shell
pipx install auto-rest-api
```
Verify that the installation completed successfully:
```shell
auto-rest --help
```
Launch an API by supplying connection parameters for your target database:
```shell
auto-rest \
--psql
--db-host localhost
--db-port 5432
--db-name default
--db-user jsmith
--db-password secure123!
```
Navigate to `localhost:8081/docs/` and view the OpenAPI documentation for your dynamically generated REST API!