Python¶
Summary: Python packages, libraries, and code notes. Last updated: 2026-11-12 (pointer to the Djangonaut Space Session 7 site); earlier, 2026-10-29 (pointer to DjangoCon Europe 2027); earlier, 2026-10-24 (own guide: running djangoproject.com locally, django-hosts subdomain routing); earlier, 2026-10-15 (Simon Charette, "Demystifying the Django ORM"); earlier, 2026-09-30 (CPython time-complexity reference)
-
See Open_Source for Linda's Djangonaut Space Session 7 site: learning path, ORM and accessibility tracks, reading list and status of her Django contributions.
-
See Open_Source for DjangoCon Europe 2027 (Innsbruck, 17-21 Feb 2027): call for participation closes 15 Nov 2026, early-bird tickets to 30 Nov, DSF grants open 30 Nov.
-
Guide: run djangoproject.com locally (Linda's own guide on her Djangonaut Space Session 7 site, written 24 Oct 2026, Ubuntu 24.04, Docker 29, Docker Compose 2.40, extended the same day): A step-by-step walk-through of the
README.rstof django/djangoproject.com by the docker-compose route: fork and clone,docker compose build/up,make reset-local-db(which flushes the local database, loads the dev site hostnames and the doc releases, and calls external APIs for the dashboard metrics),createsuperuser, the local URLs, building one docs version only (update_docs 6.1 --language eninstead of every version in every language), the tests, anddocker compose down. It also records three things the README leaves out for the virtualenv route (gettextformsgfmt,uv syncas an alternative topip install -r requirements/dev.txt, and the two PostgreSQL databases ofsecrets.json) and two build messages that look like errors and are not. The extension adds the local URL of the contact form behind issue #2904, adocker compose ps/ss -ltnpcheck for whether the site is already up, and a section on subdomain routing: the three sites (www,docs,dashboard) are one Django process on port 8000, routed on the Host header, sohttp://localhost:8000/returns a 400DisallowedHostpage whilehttp://www.djangoproject.localhost:8000/returns the home page.ALLOWED_HOSTSindjangoproject/settings/dev.pylists only the four*.djangoproject.localhostnames, which is also why Django's "localhost works in DEBUG" default does not apply;django-hoststhen stripsPARENT_HOST(djangoproject.localhost:8000in dev,djangoproject.comin production) and picks the URLconf from the subdomain indjangoproject/hosts.py, withDEFAULT_HOST = "www"as the fallback. No/etc/hostsentry is normally needed, because.localhostis reserved for the local machine (RFC 6761). Keywords: Django, djangoproject.com, django-hosts, subdomain routing, ALLOWED_HOSTS, docker compose, Djangonaut Space. Related: Open_Source, Agentic_Coding, Professional_Background. -
"Demystifying the Django ORM" with Simon Charette (Djangonaut Space, recorded for the 2024 Session 3 cohort, published 18 Nov 2024, 44 min; slides, 26 pages): Simon Charette, a Django contributor for about ten years who works mostly on the ORM and migrations, explains how a QuerySet becomes SQL and comes back as model instances, in four phases. (i) Resolving: lazy and cumulative; each
filter()orannotate()builds nested "resolvable" objects (most areExpressionsubclasses) on asql.Query, with no database-specific logic. (ii) Compilation: triggered by the first non-lazy operation; the router picks theDATABASESentry, an operation-specific compiler (SQLCompiler,SQLInsertCompiler,SQLUpdateCompiler,SQLDeleteCompiler) callsas_sql()recursively and returns(sql, params). (iii) Execution: the SQL and parameters go through the PEP 249 driver (for example psycopg) and come back as a list of tuples or an exception. (iv) Construction: values are coerced withField.from_db_value, then returned as dicts (values()), tuples (values_list()) or model instances. The Q&A coversget_or_create(use it rather than writing your own, because of race conditions), whatF()is, what lazy means, what he would change if compatibility could break (some resolving still reads the default connection's features, which blocks a fully async ORM), and a working tip: usegit blameon a line to walk back to its pull request and ticket. Watched as preparation for the ORM track of Djangonaut Space Session 7. Keywords: Django ORM, QuerySet, SQL compilation, expressions, lazy evaluation, Djangonaut Space. Related: SQL, Open_Source. -
Time complexity of operations on built-in types (Python 3 documentation): The official CPython Big-O reference for
list,tuple,dict,set/frozenset,str/bytes/bytearray,memoryview, andrange. Key points: list append/index/length are O(1) but insert/delete near the front are O(n) since everything after must shift (usecollections.dequefor both-end queues); dict/set operations are O(1) average-case (assuming well-distributed hashes) but degrade to O(n) worst-case under hash collisions;bytearraysupports amortized O(1) front-deletion by advancing the buffer start rather than moving bytes;rangeobjects compute items on demand so most operations (including slicing) are O(1) regardless of range length. Keywords: Python, Big O notation, time complexity, CPython, data structures, algorithmic complexity. - QGIS Graphical Modeler: QGIS documentation for the Processing Graphical Modeler, which lets users chain processing algorithms into repeatable, shareable geoprocessing workflows without scripting. Keywords: QGIS, processing modeler, geoprocessing, workflow automation. Related: Professional_Background.
- geopandas_kids_interactive.ipynb: A teaching notebook introducing geopandas-based geospatial analysis in an interactive, kid-friendly format. Keywords: geopandas, teaching notebook, geospatial Python, education.
- Tutorial: Earth Observation Map for Kids (Trinidad & Tobago edition): A teaching notebook adapting an Earth-observation mapping tutorial to a Trinidad & Tobago case study, aimed at introducing EO/geospatial concepts to young learners. Keywords: Earth observation, teaching notebook, Trinidad and Tobago, education. Related: Remote_Sensing.
- See Agentic_Coding for Linda's "Agentic Coding for Geospatial" certification (Spatial Thoughts, Aug 2026) on planning/building/validating geospatial data science workflows using Claude Code.
- See Conservation for the Côa Valley Eco-Connectivity notebook's pure-Python (scipy.sparse) circuit-theory pipeline, built to avoid a Julia/Circuitscape runtime dependency.
- See Reproducible_Science for the reproducibility framing behind that same pipeline choice.
- See Agriculture for the Agribound package for field boundary delineation.
- See Machine_Learning for the Text-as-Data with Python seminar (Jihye Park, Instats, Sept 2026), applying Python text-cleaning/record-linkage/topic-modelling methods to ecological and environmental documents.