/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

florimond.dev
| | bruceeckel.com
3.8 parsecs away

Travel
| | [AI summary] Bruce Eckel demonstrates six Python tricks for writing cleaner, more efficient code, including converting scripts to Windows executables, context managers, argument parsing, and configuration handling.
| | 0x00.cl
2.3 parsecs away

Travel
| | Tomas Gutierrez L. personal website (0x00)
| | janakiev.com
2.7 parsecs away

Travel
| | 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.
| | memo.mx
24.6 parsecs away

Travel
| Usage: pip install pynetbox ansible ansible all -i hosts/env -m setup --tree /tmp/facts/env #!/opt/netbox/bin/python import argparse import json import os import sys import pynetbox import yaml import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) if sys.version_info < (3, 6): print("Python 3.6 is required") sys.exit(2) def to_json(in_dict): return json.dumps(in_dict, sort_keys=True, indent=4) def load_configuration(path="/etc/ansible/netbox.yml"): """ Load netbox configurati...