Springless Database Server
Project description
# Springless DB Server (sl-dbserver)
This is a simple Python server for the purpose of spinning up and destroying full copies of a database on demand. An example use-case is running integration tests with a local postgres instance in a docker container. Each test can create its own isolated database, run its tests, and then destroy the created database instance when done.
# Requirements
Python 3.10 or later
Dependencies specified in setup.py
# Installing and running
If you are using this for testing a SQLAlchemy database, install via pip into the same virtual environment your database is on:
` pip install sl-dbserver `
Otherwise create a new virtual environment and install there.
` python3 -m venv .venv .venv/bin/python -m pip install --upgrade pip . .venv/bin/activate pip install sl-dbserver `
And then run with Uvicorn, which should be installed as part of the dependencies.
` uvicorn sl.dbserver.app:main --port 8000 `
You can then access the documentation via the /doc or /redoc endpoints. So for the example above, you would go to [http://localhost:8000/doc](http://localhost:8000/doc) or [http://localhost:8000/redoc](http://localhost:8000/redoc), which will list the available endpoints and documentation on the data to post to each.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sl-dbserver-0.0.0.tar.gz
.
File metadata
- Download URL: sl-dbserver-0.0.0.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f39cba8cee1011beefdc17c44c93f511d5e5c79b6345f5370d53a9011cb4ae4 |
|
MD5 | 1137fa4a48ef06fd4135bf51d3160998 |
|
BLAKE2b-256 | 06bf76aab9e0ca32c732dbc79b1ab80fc9ae237a9089ea74d8ce2449b7701492 |
File details
Details for the file sl_dbserver-0.0.0-py3-none-any.whl
.
File metadata
- Download URL: sl_dbserver-0.0.0-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe7fd520f2118726bde5edc3470f7d7282d27efce348fc8c345982b283d2f1c6 |
|
MD5 | 96b13f562943099aed607a08f0713898 |
|
BLAKE2b-256 | cdbfaa3fc19c519cd8dfe492339f950a67f3564374441917d63aadd6557f9912 |