Starlette-cli: make your project a cli too!
This is a starlette-app that provides a CLI with a few basic Starlette commands, and which your other apps may extend.
Example
#!/usr/bin/env python3
import apps
project = apps.Project(
APPS=['starlette_cli']
)
app = project.starlette(
routes=[your_route...],
middleware=[Middleware(your_middleware...)]
)
if __name__ == '__main__':
project.apps['cli'].entry_point()
And your Starlette script becomes an extensible CLI.
Screenshots
Help & runserver command:
Dumping urls and middlewares:
Install
Install with::
pip install starlette-cli
Extend
Add a new command to the CLI with:
from starlette_cli import cli
@cli.cmd
def your_command(...):
"""Your documentation"""
Or, from within another starlette-app if you have one:
class YourApp(apps.App):
def setup(self):
self.project.apps['cli'].add(your_command)
Metadata
Release files for starlette-cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| starlette-cli-0.1.0.tar.gz | 2.7 kB | Without provenance | Details for starlette-cli-0.1.0.tar.gz |
Release files / starlette-cli-0.1.0.tar.gz
| Download URL | starlette-cli-0.1.0.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9274a3222fe793509fb20874939d60207c2e5aff8005b8a0b39c8448c6996702
|
|
BLAKE2b-256 checksum How to use checksums |
627bb6e39ca141a048ca300643cb339987a274d4572bfd20fea13eb8beb0afbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1
|
Security for starlette-cli 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.