Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sl_dbserver-0.0.1a3.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sl_dbserver-0.0.1a3-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file sl_dbserver-0.0.1a3.tar.gz.

File metadata

  • Download URL: sl_dbserver-0.0.1a3.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.5

File hashes

Hashes for sl_dbserver-0.0.1a3.tar.gz
Algorithm Hash digest
SHA256 47c9927c45a229c868efe52a8f586c24ca1be1dd45a2ee0f75607fda71e942b6
MD5 822cde14a8720a6daa3bb7a88807df40
BLAKE2b-256 bed4798af8ff9017f3715ca5b4902f2400cf125f61c19b580b6701308502340b

See more details on using hashes here.

File details

Details for the file sl_dbserver-0.0.1a3-py3-none-any.whl.

File metadata

  • Download URL: sl_dbserver-0.0.1a3-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.5

File hashes

Hashes for sl_dbserver-0.0.1a3-py3-none-any.whl
Algorithm Hash digest
SHA256 e1cf01da88043ecbde23abb25a42f469323830fc3b6ee9ab224d261adda59ce1
MD5 c10102c6d13904aaf343b7172baeea9a
BLAKE2b-256 ccf0e21916d98105db80514550d441fec6931a23ed2e78274ce4e34bb48fd949

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page