#31: HTTPie as a Curl Replacement
If you work with a REST API, you may use curl to explore the various actions. The Python project HTTPie is a user-friendly replacement with a much clearer syntax.
If you work with a REST API, you may use curl to explore the various actions. The Python project HTTPie is a user-friendly replacement with a much clearer syntax.
If you want to create a list from the values of another list, you most likely will write a for loop. That works and is how you would solve this exercise in any other language. However, there is a more pythonic way to do it called list comprehension.
While listening to Talk Python to Me, I noticed an ad for the Talk Python Training Humble Bundle. As it turns out, this package offers a great value for your money - but this offering will only last for about 5 more days. Act quickly if you are interested.
I find podcasts an efficient way to learn more about a programming language. Not so much about the syntax or writing code itself, but about the tools, the ideas and the community. In todays post I give you a list of 5 podcasts I find interesting for Python developers.
While sorting my images I came up with a little idea: Can I find all images I took with a specific lens? As it turns out, Python offers a wide range of packages to get this information from the Exif metadata. This post is part of my journey to learn Python. You can find the other parts of this series here.
I constantly run into the problem that I cannot remember what methods exist on an object. If you have the same problem in the interactive prompt, then the built-in function dir() can help you.
While working through the VS Code tutorial on Flask, I noticed some difficulties that took more time to fix than they should have. Some problems came from the Python extension while others where my lack of understanding of VS Code. In the meantime, I found solutions for those problems that I like to share.
In a talk at NDC I saw an interesting feature of Python: A method returned not one but two values, a list of parsed entries and a list of entries with errors. This powerful feature is called unpacking of a tuple and can make your code a lot simpler.
As I try to do more useful things with Python, I need a more supportive environment for writing code than the REPL. Visual Studio Code offers a lot of nice features without the slowness one expects of a powerful IDE.
Sometimes we need a callable object that we can use as an argument to a function. While we could create a function for that purpose, there is another way that needs less typing.