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.4.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: yodas-1.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 95445d9bbd9c38b6f9fc207a4a2179dfef1ce2c289c02582710b512e16608000
MD5 9dcbe7cb91d0e3128cc5b546d3d295ff
BLAKE2b-256 656431c261ffd000459219c4a9f890a714e5051a8c90dc9c74cf2ea241acaf26

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yodas-1.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bb94dbeb8ba861fbaa8e437a16b49a0bbf957f97fdbe48e41d84c3adbe23adf1
MD5 d68f55375f9c9c6767fa0b183e2ff012
BLAKE2b-256 0c87b79a6c3b32a39395210d9c47de4c377cd3646e29567be7c6f92fba4afe1c

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