Skip to main content

ytho

Change Python's prompt with ease. Because >>> is boring.

Installation

pip install ytho

Usage

Define a file .ytho.py in your home directory, with a class Prompt.

This will define your prompt. For example:

class Prompt:
    def __init__(self):
        self.counter = 0

    def prompt(self) -> tuple[str, str]:
        self.counter += 1
        ps1 = f"\033[1;32mIn [{self.counter}] \033[m: "
        # The ANSI codes take up 10 chars, remove those
        ps2 = " " * (len(ps1) - 10)
        return ps1, ps2

And now you have IPython's prompt. And you can do a lot more than that if you want!.

Local Development / Testing

  • Create and activate a virtual environment
  • Run pip install -r requirements-dev.txt to do an editable install
  • Run pytest to run tests

Type Checking

Run mypy .

Create and upload a package to PyPI

Make sure to bump the version in setup.cfg.

Then run the following commands:

rm -rf build dist
python setup.py sdist bdist_wheel

Then upload it to PyPI using twine:

twine upload dist/*

Metadata

Release files for ytho 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ytho 0.1.0
File Size Uploaded Provenance Actions
ytho-0.1.0.tar.gz 4.7 kB Without provenance Details for ytho-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ytho 0.1.0
File Interpreter ABI Platform Actions
ytho-0.1.0-py3-none-any.whl Python 3 none any Details for ytho-0.1.0-py3-none-any.whl

Total release size: 9.3 kB

Release files / ytho-0.1.0.tar.gz

Download URL ytho-0.1.0.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
476f0c716643c6189ba72c648bf93a83eba223c7cbe85dc01288cd59e34ac25f
BLAKE2b-256 checksum
How to use checksums
673c67f19e60e6118cc75d92cc50da4341478a125e9a829100e06bc98e2075f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / ytho-0.1.0-py3-none-any.whl

Download URL ytho-0.1.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
668f8cd3dcd00b455f317d734c60c79eee93ce074787c01dca64ec1e8a95a587
BLAKE2b-256 checksum
How to use checksums
90e6f5b9b65a408807f956a341342a41cb94b6d6eeb2efce605c97725e4b9489
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Security for ytho 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page