A Python extension for real-time feedback with Python Type Hints
Amethyst for Visual Studio CodeAmethyst is a developer productivity tool for rapid Python prototyping, code inspection, and exploration. Runtime values are displayed directly in your editor as you code. Amethyst supports Python versions 3.7 - 3.11.x and includes support for inline static typing feedback. 💎 What Amethyst is great for📖 Learning and exploring the Python language in real time ❌ What Amethyst is not for⛔ Running Amethyst in scripts and applications that listen for incoming requests (Flask/Tornado apps) ☑️ RequirementsAmethyst for Python requires Python 3.5+, preferrably 3.10.x. For those who want additional protection Amethyst has support for MyPy, optional static typing. You must install MyPy in order for static typing to work, but it is not required. ⚙️ Extension SettingsHere are the Settings for Amethyst. Feel free to change them to your liking/needs.
CreditsAmethyst is essentially a continuation of the Wolf extension for Python, inspired by the QuokkaJS extension for JavaScript/TypeScript, LightTable, LiveCode, AREPL, and more. The plan is to be reasonably active with development for Amethyst and push out a few more features and eventually shift away from the idea of the "live scratchpad" to a go-to fully-featured development and debugging tool. 💭 FAQWhy is it called Amethyst?This extension is for the Python programming language so to stay on theme it was named after a kind of Pythonidae called the Amethystine Python which gets its name from the iridescent scales that appear to have a purple hue in certain lighting conditions! I'm having trouble getting Amethyst to startThis is most likely do to your Python binary setup. Make sure you have Python 3.7 or greater installed, and make sure that the verison Python you want to use is mapped to your How do I learn Python Static Typing?I recommend getting into static typing once you have established at least some familiarity with the core language of Python and how computer programs work in general. I say that because most online resources for Python are written without static typing. When you're ready, here is a great resource for getting started. Can I use this with Django and Flask?Amethyst was neither tested nor designed for use with scripts that are meant to run and wait indefinitely for requests, so I don't recommend it. It's more suited for learning and trying out new techniques to improve your understanding of Python which makes Django and Flask easier 😉 API calls & external requests?I wanted to release this with HTTP request caching built-in at launch, but unfortunately ran out of time. Caching for external requests and API calls is a high priority for this project, so if you have any ideas or you want to help, please feel free to join the discussion. Known issuesLive feedback for static typing is very slowWorking on this and should have a fix soon. Because MyPy involves a heavy extra step on every keystroke and due to the nature of type checking I am considering altering Amethyst so that these extra checks run only on save or with a higher amount of debounce. The vanilla Python feedback would still occur responsively on every keypress. If you have thoughts or suggestions, please open or chime in on an issue. Errors messages can stack on a single lineWhen dealing with multiple simultaneous errors, it is possible for them to stack up on a single line. The goal is to get any given errant line of code to show only the topmost error and to reveal errors underneath only when that one is resolved. This issue seems to be tolerable so long as you can eventually solve your issue. Pressing return at the end a line clips Amethyst annotationWhen you are at the end of a line of code that has output next to it and you press [RETURN], the annotation will briefly get clipped. This is only visible for a second, but I understand that this can be distracting and other extensions do this better. Working to resolve this ASAP. 📄 Release Notes1.1.0Fixed loading issue on Windows machines 1.0.0Initial release of Amethyst |