Skip to main content

An ipython shell for fastapi which automatically imports code and optionally opens a database connection

Project description

fastapi-shell

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install fastapi-shell

Usage

Begin a fastapi-shell session with default import rules:

python -m fastapi_shell

Exclude sandbox and tests modules from session imports:

python -m fastapi_shell --exclude sandbox tests

Only include app modules in session imports:

python -m fastapi_shell --include app

Include app modules except for tests in session imports:

python -m fastapi_shell --include app --exclude tests

Run code during session initialization:

python -m fastapi_shell --run-code "import db; db.connect()"

License

fastapi-shell is distributed under the terms of the MIT license.

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

fastapi_shell-0.1.2.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

fastapi_shell-0.1.2-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

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