This reminds me of companies rewriting applications from VB to c++/c#.<p>Half the people complained about VB being good enough and more popular.<p>But the overall feeling was that once the rapid application dev version is out the door and ok then it's a good time to redo it with something more engineering-y, for long term support before the first version gets too ossified.<p>(i'm sure i'm going to burn karma for comparing node with vb but...)
motivation:<p><i>- Dependency management for Node.js adds maintenance costs for Linux distributions.<p>- Cloud tooling vendors prefer Python to match AWS CLI and GCloud CLI.<p>- Python offers a more mature platform for building CLIs
Python is typically available on Linux distributions by default.<p>- While none of these reasons precluded building the next CLI in Node.js, Python was the natural choice.</i><p>taken from here - <a href="https://github.com/Azure/azure-cli/wiki/Motivation" rel="nofollow">https://github.com/Azure/azure-cli/wiki/Motivation</a>
I'm currently starting one project on Node.js and just this morning I thought to myself. This is too hard. I might as well rewrite it in Python.<p>The main issue for me is how Node.js is forcing you to have all I/O operations asynchronous. For what I'm doing, this is exactly what I don't need. It makes the code so much more complicated. It's callback into callback into callback and returning "promises" within "promises"... simple functions are turned into beasts. It works but it's obvious I'm not using the right tool for the job.<p>Don't get me wrong. I'm actually glad I dived into Node.js and learned a lot of new things. It's just that Node.js is very specialized framework which is amazing for certain use-cases and totally inappropriate for others.<p>On the other hand, Python is general-purpose. It's never the best tool for the job but it's almost always good enough. So once you know Python, you know you can use it in many diverse projects without giving up your sanity. Can't say the same about Node.js.
One advantage of using a dynamic language like Python is that you don't necessarily have to update the client code to be able to use new functions. You can just generate the necessary code during runtime after loading the specification from a web API. I believe this is what google does with their gcloud tools (and that's probably also the reason why it sometimes feels slow to react).
Yes, you can probably do this using Node as well, but Python comes installed on a lot of Unix based systems nowadays, as far as I can tell Node does not.
Python is the language that, once you know it, you'll never go back. It's gotten to the point where I use it to run an entire backend as well as simple terminal scripts. It's faster to write a Python script to "switch the first and third columns in a file", rather than Googling for an appropriate awk command (or spending the time to come up with one myself).
FYI, both AWS's CLI[1] and GCP's Cloud SDK(which includes CLIs like gcloud, gsutil, bq, etc.)[2] are also written in Python.<p>[1]: <a href="https://github.com/aws/aws-cli" rel="nofollow">https://github.com/aws/aws-cli</a><p>[2]: <a href="https://cloud.google.com/sdk/" rel="nofollow">https://cloud.google.com/sdk/</a>
I wish they had used GO. If you worry about distribution and dependencies, GO static binaries are clear winner. One issue with GO binaries is that they can become very big.
If you're going to write any sort of cli in Python, you really should use click <a href="http://click.pocoo.org/5/" rel="nofollow">http://click.pocoo.org/5/</a><p>Why click? <a href="http://click.pocoo.org/dev/why/" rel="nofollow">http://click.pocoo.org/dev/why/</a>
On behalf of the Python team @ Microsoft:<p><a href="http://imgur.com/gallery/MWcxIMA" rel="nofollow">http://imgur.com/gallery/MWcxIMA</a><p>Congrats!<p>Python built into Windows 10, Azure CLI in Python, Python Tools for Visual Studio, Azure Jupyter Notebooks, ... exciting times for Python devs on the msft stack!
One feature I'm loving in the new Azure CLI is a new command (`az ad sp create-for-rbac`) that will create a new Service Principal and grant it a RBAC Role assignment in a single shot. It should make the first step of setting up CI/CD scenarios a bit easier.
This is really cool! Some rambly notes:<p>* I'm interested in seeing how they plan on handling keeping an 'evergreen' state on ubuntu repos that they don't control.<p>* jmespath! It's great to see it spread more! Such a useful spec.<p>* There's an awful lot of dependencies, 59 vs 10 in the aws cli.<p>* No windows installers?<p>* Does that server side completion cost money?<p>* With such a crazy file structure, it would be great to see a getting started guide for contributing.<p>* The readme should really list the supported python versions.<p>* It's hard to tell how much is code generated and how much is custom.<p>* Help text prints right to the shell without using a pager.
I haven't used the new Azure cli, but a major issue with the node.js based cli was that it was heavily oriented towards interactive use and not well suited for use by scripts. Hard to parse output, prompt for parameters instead of accepting them on the command line, etc.
Was the submission edited?? The point I wanted to make was about the choice of language, rather then the announcement of the new tools. It's kind of rude TBH...
Personally I don't have any experience with working with neither of AWS,Azure,GCP,etc.<p>But I am so curious to know how people who have worked with them find them? Which one is better ? What is advantage of each one?<p>I couldn't find any useful information in web either.<p>Update: I am familiar with basic stuff. But I am so curious about heavy load, for example why Spotify chose gcp or etc. Was there technical reason or it was preference.
Python is a good fit for CLI tools, but it doesnt differ that much from node when it comes to complex backends.<p>Type annotations in py3 might change that, but lets be honest - py3 is still far from broad adoption.
Can someone please explain why the fact that it was in Node and is now in Python matters in the slightest, given that it's a command line utility that doesn't seem to, in any way, expose the language it is written in?<p>This could be in haskell or F# and it still wouldn't matter because it's the CLI itself that matters. (to which the question must be: is Azure popular? Is a new version of the CLI utility big news?)
Official announcement in the Azure blog: <a href="https://azure.microsoft.com/en-us/blog/announcing-azure-cli-2-preview/" rel="nofollow">https://azure.microsoft.com/en-us/blog/announcing-azure-cli-...</a>
Looks like the are going for both 2 and 3 support?<p><a href="https://github.com/Azure/azure-cli/blob/master/scripts/dev_setup.py" rel="nofollow">https://github.com/Azure/azure-cli/blob/master/scripts/dev_s...</a><p>EDIT:<p>Nah, only 3. So much for Microsoft and it's legendary backwards compatibility.<p><a href="https://github.com/Azure/azure-cli/blob/master/scripts/generate_command_inventory.py" rel="nofollow">https://github.com/Azure/azure-cli/blob/master/scripts/gener...</a>