<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Python on Work In Progress</title><link>https://www.pm50plus.co.uk/tags/python/</link><description>Recent content in Python on Work In Progress</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 20 Oct 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://www.pm50plus.co.uk/tags/python/index.xml" rel="self" type="application/rss+xml"/><item><title>My reference python code for Neo4j</title><link>https://www.pm50plus.co.uk/post/2025-10-20-go-to-python/</link><pubDate>Mon, 20 Oct 2025 00:00:00 +0000</pubDate><guid>https://www.pm50plus.co.uk/post/2025-10-20-go-to-python/</guid><description>&lt;h2 id="when-you-cant-connect"&gt;When you can&amp;rsquo;t connect&lt;/h2&gt;
&lt;p&gt;Dear Reader,&lt;/p&gt;
&lt;p&gt;I find when having those &amp;lsquo;why can&amp;rsquo;t i connect to Neo4j&amp;rsquo; moments, having a reference code that you know works is rather useful.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s my reference Python code for that situatin in case anyone finds it useful&lt;/p&gt;
&lt;p&gt;There are two files, requirements.txt and the Python code, neo4jTest.py. These are given below. Save them both in the same folder.&lt;/p&gt;
&lt;p&gt;The requirements file which will install the latest version of the Neo4j Python driver. Save as requirements.txt&lt;/p&gt;</description></item><item><title>Doing more with less</title><link>https://www.pm50plus.co.uk/post/2023-11-13-episode3-rabbit-hole/</link><pubDate>Mon, 13 Nov 2023 00:00:00 +0000</pubDate><guid>https://www.pm50plus.co.uk/post/2023-11-13-episode3-rabbit-hole/</guid><description>&lt;h1 id="episode-3-like-what-youre-done-with-that-rabbit-hole"&gt;Episode 3: Like what you&amp;rsquo;re done with that rabbit hole&lt;/h1&gt;
&lt;p&gt;Previously I wrote about the architectural pattern I was intending use for this adventure and I did make a start; honest.&lt;/p&gt;
&lt;p&gt;I took initial steps to move communications into two functions, one for tfl and the other for Neo4j but&amp;hellip;&lt;/p&gt;
&lt;p&gt;Along came a squirrel.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.pm50plus.co.uk/img/tflTube/squirrel_snow.jpg" alt="Gosh it&amp;rsquo;s cute"&gt;&lt;/p&gt;
&lt;p&gt;Not a real one like that in the picture and really not this &lt;a href="https://www.independent.co.uk/life-style/food-and-drink/brewdog-worlds-strongest-beer-squirrel-bottle-the-end-of-history-a7436201.html"&gt;one&lt;/a&gt; &lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; but a virtual one wearing a large badge of distraction that read &lt;em&gt;&amp;lsquo;I wonder if I could get all the information needed from tfl API in fewer calls?&amp;rsquo;&lt;/em&gt;&lt;/p&gt;</description></item><item><title>I am always willing to learn</title><link>https://www.pm50plus.co.uk/post/2023-10-27-episode2-rtfm/</link><pubDate>Fri, 27 Oct 2023 00:00:00 +0000</pubDate><guid>https://www.pm50plus.co.uk/post/2023-10-27-episode2-rtfm/</guid><description>&lt;h1 id="episode-2-i-am-always-willing-to-learn"&gt;Episode 2: I am always willing to learn&lt;/h1&gt;
&lt;p&gt;&lt;img src="https://www.pm50plus.co.uk/img/tflTube/layered-cake.png" alt="Layer Cake"&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.pm50plus.co.uk/2023/10/13/python-neo4j-and-the-tube.html"&gt;In Epsode 1&lt;/a&gt; I walked you through getting information from Tfl API ( transport for london ) and using that to start building a graph in Neo4j. Before we go much further in this endeavour, it&amp;rsquo;s time to look at how we&amp;rsquo;re approaching the architecture of this code and look at a couple ( there&amp;rsquo;s more I know ) of items that need looking at.&lt;/p&gt;</description></item><item><title>It is all about the REST</title><link>https://www.pm50plus.co.uk/post/2023-10-20-introduction-to-aura-api/</link><pubDate>Fri, 20 Oct 2023 00:00:00 +0000</pubDate><guid>https://www.pm50plus.co.uk/post/2023-10-20-introduction-to-aura-api/</guid><description>&lt;h1 id="it-is-all-about-the-rest"&gt;It is all about the REST&lt;/h1&gt;
&lt;p&gt;&lt;img src="https://www.pm50plus.co.uk/img/mySleepingCat.png" alt="My sleeping cat"&gt;&lt;/p&gt;
&lt;p&gt;Neo4j DB as a Service ( DBaaS ) , Aura, now has a RESTful like API for provisioning. The full details of the API in long form are in the &lt;a href="https://neo4j.com/docs/aura/platform/api/specification/"&gt;documentation&lt;/a&gt;; in short it&amp;rsquo;s a set of endpoints that provide for CRUD operations. You can try the Aura API from the documentation. Here we&amp;rsquo;re going to dig in and write code to do the needful.&lt;/p&gt;</description></item><item><title>Using Python and data from Tfl API</title><link>https://www.pm50plus.co.uk/post/2023-10-13-python-neo4j-and-the-tube/</link><pubDate>Fri, 13 Oct 2023 00:00:00 +0000</pubDate><guid>https://www.pm50plus.co.uk/post/2023-10-13-python-neo4j-and-the-tube/</guid><description>&lt;h1 id="episode-1--back-to-school"&gt;Episode 1 : Back to school&lt;/h1&gt;
&lt;p&gt;&lt;img src="https://www.pm50plus.co.uk/img/tflTube/tflStations.png" alt="London Tube Stations"&gt;&lt;/p&gt;
&lt;p&gt;To become more familar with the TfL API and working with Neo4j programmatically , I&amp;rsquo;m going to write some funky Python code to explore and learn more about them. In Agile terms, it&amp;rsquo;s a Spike. The vast majority of this code is likely to be thrown away - no need to make it pretty , optimised or anything like that, just functional.&lt;/p&gt;</description></item></channel></rss>