How to package Python code with uv, in 4 images. 馃悕
Name a command, run uv build, share the wheel.
#Python#Coding
ALT Slide reading 'Package your Python code with uv'. The next slides show the four commands, the function greet calls with its output, and the takeaway 'A package is a folder + a toml'.
A pytest test is just an assert, in 4 images. 馃悕
#Python#Coding
ALT Slide reading 'A test is just an assert'. The next slides show the test code, its failure output assert 5 == 6, and the naming rules, and end with: A test is an assert.
Fetch JSON from the web with urlopen and json.load, in 4 images. 馃悕
#Python#Coding
ALT Slide reading 'Fetch data from the web, no install'. The next slides show the urlopen code, its output delectus aut autem, and end with: urlopen + json.load.
How to call a web API in Python, in 4 images. 馃悕
urlopen the URL, json.load the response: you get a dictionary.
#Python#Coding
ALT Slide reading 'Call a web API in Python'. The next slides show code that opens a URL and loads the JSON, a terminal printing 'delectus aut autem' and False, and the takeaway 'URL in, dictionary out'.
Walk a tree left, node, right and get sorted values, in 4 images. 馃悕
#Python#Coding
ALT Slide reading 'A tree that hands you sorted values'. The next slides show the inorder function, its output [1, 2, 3], and end with: Left, node, right = sorted.
How an in-order walk visits a binary tree, in 4 images. 馃悕
Walk left, print the node, walk right: the values come out sorted.
#Python#Coding
ALT Slide reading 'Walk a tree left, node, right'. The next slides show a recursive inorder function, a terminal printing 1, 2, 3, 4, 6, and the takeaway 'Left, node, right = sorted order'.