Skip to main content

A set of made for CLI interfaces in Python

Project description

yodaTools

A group of tools I programmed that I use regularly. Public because why not, exists because I was tired of scrolling through repos to copy/paste the same code again and again.

Yoda

This is used by me personally to write scripts that require authentication. For example in telegram, I don't want to have my first commits to have the telegram token.

using this as an example, to create a valid json file on the spot with the required keys I just run >>> yodaObject = Yoda("tokens.json", ["token"]) >>> yodaObject.contents() to print out the contents

Menu

This is a menu thing I wrote actually years ago, looking at the code for the menu now it is absolutely disgusting Any unhandled errors that occur will have a traceback tree the size of the distance between here and andromeda.

Like the latest commit I copied the menu code from was in March 2017.

One day I will optimise it and on that day you will get an unhandled ErectionError the size of the distance I mentioned earlier but in microns

Okay so I fixed it slightly Menu is now a class

options = [{"Quit": exit},
           {"Menu 2": sample1}]
m = Menu(options, title="Main menu")
while True:
    f = m.menu()
    f()

Since I didn't want to copy git repos into other projects, I made a pip package $ pip install yodas

TODO

  1. In Yoda class, add option to have other variables like a key: list, or key: dict
  2. In Menu class, add argument management

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

yodas-1.0.5.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

yodas-1.0.5-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file yodas-1.0.5.tar.gz.

File metadata

  • Download URL: yodas-1.0.5.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.9

File hashes

Hashes for yodas-1.0.5.tar.gz
Algorithm Hash digest
SHA256 d52a84a17ac0a1385436bc58e0cbb7bfa757b286f04ffb5283fcbaf49620f765
MD5 a7aeb0baf7d0cb0e30ae370da426f3a0
BLAKE2b-256 120a48d0c207ebde14a6259cbf65c0fecd7680750cbfce41727f0d9abffc103c

See more details on using hashes here.

File details

Details for the file yodas-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: yodas-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.9

File hashes

Hashes for yodas-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 53b03884deb8c0d157f098f0550518592743c171436199b22328b05d3f5d3a51
MD5 a6c1c4fe759075f84d6df7ee471da20a
BLAKE2b-256 69935dda0036026cfb54209e5826a587e8866e7458027b6b85e59cadc6839b3d

See more details on using hashes here.

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