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
Hashes for sl_dbserver-0.0.1a2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 062a513f41f2f603bb941957780e5cd5d68b27923f6710b96b89ee2202322551 |
|
MD5 | 5f9f20dba84a0c88334098c0ef3f3337 |
|
BLAKE2b-256 | 01f59909c8bba0e9a8632f922bff7114ae291413ef0800ea16c1e6761f91c815 |