Metadata-Version: 2.4
Name: Myte
Version: 0.4.0
Summary: Myte is a Python web app tooling CLI for scaffolding framework projects, running development servers, watching for changes, and improving local debugging workflows.
Author: Samuel Doghor
Author-email: Samuel Doghor <talkto@samdoghor.com>
License: MIT License
        
        Copyright (c) 2023 Samuel Doghor
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/samdoghor/myte
Project-URL: Issues, https://github.com/samdoghor/myte/issues
Project-URL: Changelog, https://github.com/samdoghor/myte/blob/main/CHANGELOG.md
Keywords: Myte,Flask,FastAPI,Tornado,Bottle,Pyramid,CherryPy,CLI,Dev server,Reload,Web framework,Project bootstrapping,Framework
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Environment :: Console
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer
Requires-Dist: inquirer
Requires-Dist: rich
Dynamic: license-file

# Myte Documentation

Python web project tooling made easy.

![Last commit](https://img.shields.io/github/last-commit/samdoghor/myte) ![GitHub Release](https://img.shields.io/github/v/release/samdoghor/myte) ![GitHub License](https://img.shields.io/github/license/samdoghor/myte) ![PyPI - Version](https://img.shields.io/pypi/v/myte?style=plastic) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/myte)

Myte is a framework-aware command-line toolkit for starting and running Python web applications. It gives Python developers a consistent project workflow across Flask, FastAPI, Tornado, Bottle, Pyramid, and CherryPy without forcing every framework into the same shape. Each generated project keeps the conventions of its chosen framework, while Myte provides the common tooling layer around it: template discovery, project creation, dependency installation, development server startup, file watching, reloads, URL display, and clearer startup hints.

Most Python web frameworks are excellent once the application is already running, but the first few minutes of a project often feel repetitive: choose a folder structure, create environment files, wire a server entrypoint, remember the right command, install dependencies, and configure reload behavior. Myte handles that setup path and records the important project metadata in `myte.toml`, so the generated app is not just a copied folder. It becomes a Myte-aware project that can be inspected, installed, and run through one predictable CLI.

The goal is to bring the smoothness people expect from tools like Vite into the Python web ecosystem. `myte create` starts the project, `myte templates` shows what is available, `myte install` installs project dependencies, and `myte dev` starts the correct framework server with reloads and local URL output. Myte does not replace Flask, FastAPI, or any other framework; it coordinates them so switching between project types does not mean relearning the basic development workflow every time.

Myte is still early, but the core tooling direction is in place: every supported framework now has both fullstack and REST API templates, and the CLI is designed to grow into a broader local development companion for Python web projects.

## Why Use Myte

Use Myte when you want a fast, opinionated start for a Python web app without reducing your project to a disposable boilerplate folder. A Myte project gives you a working server entrypoint, environment configuration, health route, dependency file, and development workflow from the first command.

Myte is useful when:

- You want to compare frameworks without rebuilding the same starter structure by hand.
- You need a repeatable way to create fullstack apps and REST APIs.
- You want generated projects to include enough structure for real development, not only a hello-world file.
- You want one command, `myte dev`, to start the right framework server and show where it is running.
- You want file watching and restarts handled consistently across framework templates.
- You want new contributors to run a project without first learning framework-specific startup details.

## Features

- Project scaffolding from bundled templates
- Template discovery from the CLI
- Non-interactive creation for scripts and repeatable workflows
- Interactive creation for guided setup
- Project metadata via `myte.toml`
- Framework-aware development server with `myte dev`
- File watching and process restarts during development
- Local URL display with `--host` and `--port` options
- Clearer Myte hints when framework startup fails
- Dependency installation command with `myte install`
- Health checks with `myte doctor`
- Legacy `create-myte` command kept for compatibility

## Supported Templates

| Framework | Template | Status |
| --- | --- | --- |
| [Flask](https://flask.palletsprojects.com/) | Fullstack | Completed |
| [Flask](https://flask.palletsprojects.com/) | Restful API | Completed |
| [FastAPI](https://fastapi.tiangolo.com/) | Fullstack | Completed |
| [FastAPI](https://fastapi.tiangolo.com/) | Restful API | Completed |
| [Tornado](https://www.tornadoweb.org/en/stable/) | Fullstack | Completed |
| [Tornado](https://www.tornadoweb.org/en/stable/) | Restful API | Completed |
| [Bottle](https://bottlepy.org/) | Fullstack | Completed |
| [Bottle](https://bottlepy.org/) | Restful API | Completed |
| [Pyramid](https://trypyramid.com/) | Fullstack | Completed |
| [Pyramid](https://trypyramid.com/) | Restful API | Completed |
| [CherryPy](https://docs.cherrypy.dev/en/latest/) | Fullstack | Completed |
| [CherryPy](https://docs.cherrypy.dev/en/latest/) | Restful API | Completed |

## Installing

It is recommended to install Myte outside a project virtual environment if you want it available globally for bootstrapping new projects.

```bash
pip install myte
```

or

```bash
python -m pip install myte
```

## Usage

List available templates:

```bash
myte templates
```

Create a project without prompts:

```bash
myte create myte-project --framework flask --template fullstack
```

Create a REST API project:

```bash
myte create api-project -f flask -t restful-api
```

Create the same shape with another framework:

```bash
myte create api-project -f fastapi -t restful-api
myte create site-project -f tornado -t fullstack
```

Use the guided wizard:

```bash
myte create --interactive
```

The old command still works:

```bash
create-myte
```

## Project Workflow

After creating a project:

```bash
cd myte-project
myte install
myte dev
```

`myte dev` starts the framework recorded in `myte.toml`, prints the local URL, keeps the framework debugger output visible, and restarts the process when project files change. You can also choose the host and port:

```bash
myte dev --host 0.0.0.0 --port 8000
```

Disable Myte-managed reloads:

```bash
myte dev --no-reload
```

Generated projects include a `myte.toml` file that records the framework, template, and default commands. This gives Myte a project identity to build on as more lifecycle commands are added.

```toml
[project]
framework = "flask"
template = "fullstack"
entry = "src/server.py"

[commands]
dev = "python src/server.py"
install = "pip install -r requirements.txt"
```

## CLI Commands

| Command | Description |
| --- | --- |
| `myte create` | Create a project from a template |
| `myte templates` | List bundled templates |
| `myte inspect <framework> <template>` | Show template details |
| `myte install [path]` | Install dependencies for a generated project |
| `myte dev [path]` | Run a generated project with URL display, reloads, and clearer error hints |
| `myte doctor` | Check Myte runtime and template availability |

## Contribution

See [Contributing Guide](CONTRIBUTING.md).

## License

[MIT](LICENSE).
