/explore
|
You are here |
florimond.dev | ||
| | | | |
janakiev.com
When writing programs, there is often a large set of configuration and credentials that should not be hard-coded in the program. This also makes the customization of the program much easier and more generally applicable. There are various ways to handle configuration and credentials and you will see here a few of the popular and common ways to do that with Python. |
|
| | | | | ||
| | | | |
pythontest.com
I was asked recently about how to test the argument parsing bit of an application that used argparse. argparse is a built in Python library for dealing with parsing command line arguments for command line interfaces, CLI's. You know, like git clone . git is the application. is a command line argument. clone is a sub-command. Well, that might be a bad example, as I'm not going to use subcommands in my example, but lots of this still applies, even if you are using subcommands. |
|
| | | | | ||
| | | | |
dusty.phillips.codes
I really appreciate Python's pathlib module for managing filesystem stuff. While I don't love the argparse module for command line parsing, I don't think it's worse than other available options. I usually choose it for my CLI scripts, since nothing else is good enough to overcome the inertia of using a third party library. Not many people seem to be aware that the two can very easily be combined such that argparse will return Path objects instead of strings that need to be adapted after you query them: |
|
| | | | | ||
| | | | |
ag91.github.io
[AI summary] The author provides a technical guide on enabling OAuth2 authentication for Gmail and Microsoft accounts within an Emacs and OfflineIMAP email setup. |
|
| | | |||