DEV Community

Cover image for A Minimalist Python Version Manager
Harsh Singh
Harsh Singh

Posted on

1

A Minimalist Python Version Manager

Python Support in Shuru: Version 0.0.9

Shuru just got an upgrade—Python version management is now live! If you’ve been using Shuru for your Node.js tasks, you'll be glad to know you can now manage your Python versions with the same ease.

What’s New?

With this latest release (v0.0.9), Shuru can download, build, and install Python from source, all by simply configuring your shuru.toml. No need for extra tools like pyenv anymore. Just define the Python version you need, and Shuru takes care of the rest.

Here’s how it looks in your shuru.toml:

[versions]
python = "3.10.2"

[[task]]
name = "setup"
command = "pip install -r requirements.txt"

[[task]]
name = "run"
command = "python app.py"
default = true
Enter fullscreen mode Exit fullscreen mode

Under the Hood

When you specify a Python version, Shuru will:

  1. Download the Source: It grabs the specified version from the official Python website.
  2. Compile It: This isn’t just a simple download and go. Shuru compiles Python from source, allowing for greater customization if you need it.
  3. Install: Finally, it installs Python in your designated environment.

If you want to see the build process in real-time, set the SHURU_BUILD_PYTHON_VERBOSE environment variable:

export SHURU_BUILD_PYTHON_VERBOSE=1
Enter fullscreen mode Exit fullscreen mode

With this variable enabled, you’ll get detailed output during the build, making it easier to troubleshoot if anything goes wrong.

What About Node.js?

Python isn’t the only language Shuru supports. It still manages your Node.js versions in the same way, so you can seamlessly switch between environments for different projects. Shuru makes it easy to configure both in a single file, ensuring you’re always running the correct versions for your applications.

Final Thoughts

This addition makes Shuru a more versatile tool for developers who work in both JavaScript and Python. Managing your development environment should be straightforward, and Shuru aims to simplify that process.

Check out the latest version on GitHub and start integrating Python management into your workflow. Happy coding!

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay