Remix.run Logo
Alifatisk 9 hours ago

I like the message the article is trying to convey, Python is good alternative to complicated shell scripts in my opinion.

I do wonder, let's say the scripting file is using lots of libraries, do you have to include some kind of requirements.txt file with it aswell when you want to share it with other people?

In Ruby, there is inline bundler which makes sharing a single Ruby script very portable.

https://bundler.io/guides/bundler_in_a_single_file_ruby_scri...

bccdee 3 hours ago | parent | next [-]

uv does that these days:

  # /// script
  # dependencies = [
  #   "requests<3",
  #   "rich",
  # ]
  # ///
  
  import requests
zelphirkalt 5 hours ago | parent | prev [-]

One would be well-advised to provide not only a requirements.txt file, but also a lock file, if the use case is important enough.