Skip to main content

Build Typer CLI Apps with File System-Based Routing

Project description

PyPI PyPI - License Documentation Tests Run on Ubuntu Python Versions Tests Run on Macos Python Versions Tests Run on Windows Python Versions Github Repo

typer-router

Overview

Build Typer CLI Apps with File System-Based Routing

Getting Started

Install typer-router:

pip install typer-router

A simple example:

import typer_router
from my_package import my_app

router = typer_router.Router.from_app_module(my_app)
app = router.to_typer(name="my_app_name")

See a more in-depth tutorial here.

Development Status

This project is currently in early-stage development. There may be breaking changes often. While the major version is 0, minor version upgrades will often have breaking changes.

Developing

First, you need a couple global dependencies installed, see their documentation for details:

Then clone the repo and run npm install and mvenv sync dev. Make your changes and then run just to run formatting, linting, and tests.

Develop documentation by running just docs to start up a dev server.

To run tests only, run just test. You can pass additional arguments to pytest, e.g. just test -k test_something.

Prior to committing, you can run just with no arguments to run all the checks.

Author

Created by Nick DeRobertis. MIT License.

Links

See the documentation here.

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

typer-router-1.1.0.tar.gz (11.6 kB view hashes)

Uploaded Source

Built Distribution

typer_router-1.1.0-py3-none-any.whl (13.7 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