<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Andreas Therkildsen on Medium]]></title>
        <description><![CDATA[Stories by Andreas Therkildsen on Medium]]></description>
        <link>https://medium.com/@andthe?source=rss-208654e51025------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ExF7Ijr5LA0WNXFqYcqP-A.jpeg</url>
            <title>Stories by Andreas Therkildsen on Medium</title>
            <link>https://medium.com/@andthe?source=rss-208654e51025------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 16:32:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@andthe/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Sentry: The Python App’s Watchful Sidekick! ‍♀️]]></title>
            <link>https://medium.com/@andthe/sentry-the-python-apps-watchful-sidekick-%EF%B8%8F-106555183beb?source=rss-208654e51025------2</link>
            <guid isPermaLink="false">https://medium.com/p/106555183beb</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[sentry]]></category>
            <dc:creator><![CDATA[Andreas Therkildsen]]></dc:creator>
            <pubDate>Sat, 20 Jan 2024 13:30:48 GMT</pubDate>
            <atom:updated>2024-01-20T14:33:05.276Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Tired of faulty code, bugs, slow queries or strange application behavior? Sentry.io might be the addition to your software toolbox.</em></p><p>TDLR: The following article demonstrates how to integrate <a href="https://sentry.io/welcome/">Sentry.io</a> into a <a href="https://www.python.org/">Python</a> project, utilizing tools such as performance monitoring, bug detection, optimization suggestions and alerts.</p><p><strong>Disclaimer // Pre read<br></strong>Sentry.io is a language agnostic and provides several SDK’s to a lot of languages and frameworks. The following principles can be implemented in other languages as PHP, GO, RUST or Java, Apps or even Serverless as AWS Lambda, Azure Functions and GPC Cloud Functions. Also there is alternatives to Sentry.io, so always choose what is right for you and your team. The below article is for inspiration and demoing the potential of Sentry.io for your software projects. The software is no way near production grade.</p><p><strong>Intro — what’s on deck? <br></strong>Running a application without any kind of monitoring is bad for your business and end users, and even more bad for you as a developer. This article digs into a the main features of Sentry on a very basic level. Primarily catching errors, solving errors with AI, cron monitor and alerts.</p><p><strong>Setting up Sentry and Python<br></strong><em>Step 1 — Sign up to Sentry </em><br>First step is signing up for a Sentry.io free or paid account. For this case a free tier should be plenty.</p><p><em>Step 2 — Create a new project<br></em>For this article we are using Python. Below is a small gif of the project creation process. <br>(1)Choose your platform; Select Python.<br>(2) Set your alert Frequency: Skip this for now. <br>(3) Name your project and assign it a team: Name is as you would like.</p><p>Notice: I&#39;m not using any frameworks for this demo, so that’s I skip it in the setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*qnEJvp6ys4_q1MMNcOG-hg.gif" /></figure><p>Afterwards you are met with a success screen, presented your <a href="https://docs.sentry.io/product/sentry-basics/concepts/dsn-explainer/">Sentry DS</a>. Note this for later use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*AUlaEz0j3mYAq-NLRGbdIQ.png" /></figure><p><em>Step 3 — Setting up the Python to interact with Sentry<br></em>First and foremost i have created a “Sentry Wrapper” for this project. I don’t want in initialize Sentry with sentry_sdk.init in every script.</p><pre>#src/core/sentry_wrapper.py<br>import os<br>import sentry_sdk<br><br>from dotenv import load_dotenv<br><br>&quot;&quot;&quot;Generic wrapper class for implementing Sentry&quot;&quot;&quot;<br><br><br>class SentryWrapper:<br>    def __init__(self) -&gt; None:<br>        load_dotenv()<br><br>        sentry_sdk.init(<br>            dsn=os.environ.get(&quot;SENTRY_DSN&quot;),<br>            max_breadcrumbs=50,<br>            debug=False,<br>            enable_tracing=True,<br>            attach_stacktrace=True,<br>            traces_sample_rate=1.0,<br>            profiles_sample_rate=1.0,<br>            environment=os.getenv(&quot;ENVIRONMENT&quot;),<br>        )</pre><p>Testing the integration to Sentry is pretty forward for here — we will use their default example division_by_zero = 1 / 0. In the below script i have imported the sentry_sdk which might seem a bit redundant, this is done to include all availably of all the Sentry functions at implementation instead of abstraction.</p><pre>#src/demo/code/divison_zero.py<br>from core.sentry_wrapper import SentryWrapper<br>import sentry_sdk<br><br><br>def divison_error() -&gt; None: <br>    try: <br>        SentryWrapper()<br>        division_by_zero = 1 / 0<br>    except Exception as e: <br>        sentry_sdk.capture_exception(e)<br><br><br>divison_error()</pre><p>Running the script in our terminal results in a error, which is now present in Sentry in the Issues tab under our project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BizxU1WWMa4XGfU-gFANuQ.png" /></figure><p>If we click into the ZeroDivisonError we are presented with alot of metrics and information about the sigle error — more on this later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4JMjoHwrq_lJfFo9vUkzkA.png" /></figure><p>Now that we have setup the basic connection to Sentry and verified that errors are logged, we can move forward the the next section — specific use cases.</p><p><strong>Catching bugs in the code with a drizzel of AI socery<br></strong>Sentry can catch errors and bugs in your code and report exactly where it goes wrong. For this is have created a script that adds two integers (a, b). The only error is that I parse both a integer and a string to my function.</p><pre>from core.sentry_wrapper import SentryWrapper<br>import sentry_sdk<br><br>def add_numbers(a, b):<br><br>    try: <br>        SentryWrapper()<br>        result = a + b<br><br>        return result<br>    except Exception as e: <br>        sentry_sdk.capture_exception(e)<br><br># Error: Trying to concatenate a string and an integer<br>number1 = 5<br>number2 = &quot;10&quot;<br><br>sum_result = add_numbers(number1, number2)<br>print(f&quot;The sum of {number1} and {number2} is: {sum_result}&quot;)</pre><p>But not worries, Sentry got our back! If we navigate to our project we can see our new error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VGVaSDFqxVLOZRYufO0Kqg.png" /></figure><p>Sentry tells is at what line our code is bugging out and furthermore that it’s a type error. So this seems like a pretty easy fix, we just need to correct our string “10” to integer 10. But what if I don’t know what to do? Sentry has deployed a AI solution that scans the single error and provide a possible solution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*OzbhFeCdq-K0cScqBZTsJg.gif" /></figure><p>I&#39;m not sure that I agree with the AI solution at this point, hence it wants to edit our function to edit only one of the params. In the end of the day, you know what&#39;s best — but we sure got some help at least.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aGZ0Uvj8rbHGRyJieD_Rag.png" /></figure><p>A addition could be misnamed variables or unfinished code. Sentry will catch these common errors and report as new issues. Very handy for development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pEnVz9rjVepPJngSlBJ4BA.png" /></figure><p><strong>Monitoring outgoing HTTP request<br></strong>Another great case for Sentry could be monitoring external API calls in your project. A lot of software projects either needs to fetch or post data to/from external resources. For Python with the specific usage of the requests module we can raise a exception if http errors occurs.</p><pre>#src/demo/http/external_http.py<br>from core.sentry_wrapper import SentryWrapper<br>import sentry_sdk<br>import requests<br><br>def external_http() -&gt; None: <br><br>    try: <br>        SentryWrapper()<br>        response = requests.get(&quot;https://httpstat.us/500&quot;)<br>        response.raise_for_status()<br>    except Exception as e: <br>        sentry_sdk.capture_exception(e)<br>      <br>external_http()</pre><p>When the above script is executed we will receive a HTTP 500 that Sentry will report. This function is pretty neat and can be used for reporting and triggering alerts. (More on this in a later section)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AE6ziggeBWHFWIDo02Ivsw.png" /></figure><p><strong>Monitoring Cronjobs<br></strong>Cronjobs or scheduled tasks is a pretty common pattern in software. First let’s setup a new cronjob in Sentry. The schedule is set aggressivefor the demo running * * * * *.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*liPjSRHYlL_144LOFQ4Viw.png" /></figure><p>Our demo cronjob is setup as below. For now we will just execute the script via CMD.</p><pre>#src/demo/cron/activity.py<br>from core.sentry_wrapper import SentryWrapper<br>import sentry_sdk<br>from sentry_sdk.crons import monitor<br><br># Add this decorator to instrument your python function<br>@monitor(monitor_slug=&#39;report_activity&#39;)<br>def my_cron_job() -&gt; None: <br>    try:<br>        SentryWrapper()<br>        print(&quot;Our cronjob has run successfully&quot;)<br> <br>    except Exception as e: <br>        sentry_sdk.capture_exception(e)<br><br><br>my_cron_job()</pre><p>Sentry Crons will now report both successful and missed runs based on our cron time, that we set to * * * * *. The green bars indicate successful “check-ins”. The yellow indicate missed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WzrTXkt1UVGcUb38UYOWVA.png" /></figure><p>Additional it will be reported under the Issues tab in Sentry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SQNcSQGXJkFLHRYbC4MHmQ.png" /></figure><p><strong>Setting up Alerts <br></strong>From all of the examples above it’s now possible to setup alerts. For this example I have setup a new alert that sends a email every time a new issues of the type cronjob occurs. This can be configured to single type of errors or simply report all errors that occur.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*3ThqXIhgHck1KkhnbFHSbQ.gif" /><figcaption>Creating a new alert</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*QvqNUm5Y9ULmIVRENULy6g.gif" /><figcaption>Setting up the cron rule</figcaption></figure><p>And now we receive a alert via email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rMr14_pHvqLcESUUvJE5kA.png" /></figure><p>The default alert rule for Sentry is reporting all errors to the teams email, as I very well demonstrate below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*59v4G2npNCPoKtLu8ItFdg.png" /></figure><p><strong>Wrap up<br></strong>Sentry.io serves as a solid companion for software applications, offering seamless integration and features like performance monitoring and bug detection. Demonstrating adaptability across languages, it provides developers with a versatile solution for code quality improvement. With AI-driven bug detection and customizable alerts, Sentry.io is a potent tool for effective application monitoring and development.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=106555183beb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Basic yet Solid Python GitHub Pipeline Action]]></title>
            <link>https://medium.com/@andthe/a-basic-yet-solid-python-github-pipeline-action-20a344c5c5f1?source=rss-208654e51025------2</link>
            <guid isPermaLink="false">https://medium.com/p/20a344c5c5f1</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[github-actions]]></category>
            <dc:creator><![CDATA[Andreas Therkildsen]]></dc:creator>
            <pubDate>Wed, 17 Jan 2024 17:42:48 GMT</pubDate>
            <atom:updated>2024-01-19T11:51:36.398Z</atom:updated>
            <content:encoded><![CDATA[<p>TLDR: Hacked together a demo for a basic Python project including GitHub Actions, pull request template and testing.</p><p><a href="https://github.com/andreastherkildsen/andthe-medium-python-project">GitHub - andreastherkildsen/andthe-medium-python-project: Demo project for a medium article</a></p><p><strong>Disclaimer<br></strong>I don’t have much experience with Python, so all feedback is appreciated. Also, bear in mind that this is a very basic example with room for improvement. Mainly done for inspiration.</p><p><strong>The rationale<br></strong>As I entered a new role as a Solution Architect, I was tasked with demonstrating how to set up a GitHub repository with items such as designing a software project, documentation, monitoring, testing, and linting.</p><p>From my previous gig, i have spent 6 years maintaining a e-commerce platform, both as a monolith and later replatform into a MACH and composeable setup. The replatform project tought me alot of things, but some of the items that shines thorugh is modularity, a clean maintainable codebase and a solid deployment piepline.</p><p>I had the flexibility to choose the programming language and framework of my choice. Hence, as many of my colleagues had interest in Python, I figured that would be a great choice. From my previous job, I was primarily using PHP, so using another interpreted language with the familiar letter ‘<strong>P</strong>’ felt natural to me.</p><p>This below will outline the major items of the project and not detailed usage of GitHub or Sentry.io.</p><p>So lets dig into it.</p><p><strong>Though process and task list<br></strong>I want to create a GitHub Action so that my demo repository can serve as a reference with room for improvement. I didn&#39;t want overengineer it, but align it with best practices for a potential setup. (This may vary from project to project and depend on who’s calling the shots. 😊)</p><p>From this my todo list looked alot like this:</p><ul><li>Get familiar with the basics of Python (<a href="https://pypi.org/project/pip/">pip</a>, <a href="https://peps.python.org/pep-0008/">pep8</a>, package development)</li><li>Create a basic Python project</li><li>Write some demo code</li><li>Selecting a testing framework + write tests for demo code</li><li>Selecting a linter</li><li>Implementation of <a href="https://sentry.io/welcome/">Sentry.io</a></li><li>Create GitHub Action</li></ul><p><strong>Creating a basic python project<br></strong>Hence, since this is a demo project, I chose not to use frameworks or scaffolding tools like Django or Flask.</p><p>For the project, I have opted for a ‘modular’ or ‘functional’ approach that isolates core functions for implementation in specific use cases. This was done to promote maintainability, readability, and scalability of the codebase.</p><p>Folder structure is explained below.</p><pre>docs: Contains documentation for the project on the app<br>src: Contains base project<br>/core: Contains the base business logic / features in the app - sorted by entities/features e.g. events, log, azure<br>/demo: Contains demo tasks or scripts implementing features/modules from core/<br>tests: Contains tests for the application (e.g. integration test, unit test, end to end test)<br>logs: Directory used for logfile storage<br>shell: Utility scripts for cleaning cache and logs</pre><p><strong>Write some demo code<br></strong>For my demo code, I have written three modules: an <em>event-mocker</em>, a <em>logger</em>, and a <em>sentry-wrapper</em>.</p><p>The event-mocker is designed to mock generic business events, such as create-order and order-cancelled.</p><p>The logger is intended to log messages into either the default file or a specified file in the /logs directory.</p><p>The sentry-wrapper serves as a utility module for a centralized implementation of Sentry, avoiding the need to initialize the library with every implementation.</p><p><strong>Selecting a testing framework + write tests for demo code<br></strong>Pytest seemed like a solid framework for this basic case. Pytest includes assertions, async functionality, grouping and inclusion/exclusion of tests.</p><p>A basic test of mock_ecom.py from event module:</p><pre>from src.core.events.mock.mock_ecom import MockEcommerce<br><br>def test_mock_ecommerce_event() -&gt; None:<br>    event_data = MockEcommerce.mock_ecommerce_event()<br><br>    assert &quot;event&quot; in event_data<br>    assert &quot;product_id&quot; in event_data<br>    assert &quot;customer_id&quot; in event_data<br>    assert &quot;timestamp&quot; in event_data<br>    assert isinstance(event_data[&quot;timestamp&quot;], float)</pre><p>A basic test of <em>logger </em>module:</p><pre>import os<br><br>from src.core.utils.logger import Logger<br><br><br>def test_logger_default_log() -&gt; None:<br>    test_message = &quot;Test message&quot;<br>    Logger.log(test_message)<br>    log_file_path = os.path.join(Logger.logs_dir, Logger.default_log)<br><br>    assert os.path.exists(log_file_path)<br><br>    with open(log_file_path) as file:<br>        content = file.read()<br>        assert test_message in content<br><br><br>def test_logger_custom_log() -&gt; None:<br>    custom_log_file = &quot;test-logger.log&quot;<br>    test_message = &quot;Test message is present in log&quot;<br><br>    Logger.log(test_message, file_name=custom_log_file)<br>    log_file_path = os.path.join(Logger.logs_dir, custom_log_file)<br><br>    assert os.path.exists(log_file_path)<br><br>    with open(log_file_path) as file:<br>        content = file.read()<br>        assert test_message in content</pre><p><strong>Selecting a linter<br></strong>After a few Google Searches i stumbled upon <a href="https://docs.astral.sh/ruff/">Ruff</a><strong>. </strong>Ruff seems like the <em>new-kid-on-the-block</em> that implements/respect additional linter rules e.g. <a href="https://flake8.pycqa.org/en/latest/">Flake8</a> and <a href="https://github.com/psf/black">Black</a>. Furthermore Ruff is build with RUST, so it tingles my buzz-word-bingo-itch.</p><p>For my project i have choosen the following <a href="https://docs.astral.sh/ruff/rules/">Ruff Rules</a> for my linting, which can be set in pyproject.tolm by [tool.ruff]</p><pre>[tool.ruff]<br>line-length = 100<br>select = [<br>    &quot;A&quot;,  # prevent using keywords that clobber python builtins<br>    &quot;B&quot;,  # bugbear: security warnings<br>    &quot;E&quot;,  # pycodestyle<br>    &quot;F&quot;,  # pyflakes<br>    &quot;ISC&quot;,  # implicit string concatenation<br>    &quot;UP&quot;,  # alert you when better syntax is available in your python version<br>    &quot;RUF&quot;,  # the ruff developer&#39;s own rules<br>    &quot;ANN&quot;, # flake8 annotiations<br>]</pre><p>Running the Ruff linter with both format and check results in the below output and suggestions accordingly to the rules.</p><pre>PS C:\kode\medium\python-demo-medium&gt; python -m ruff format<br>warning: The following rules may cause conflicts when used with the formatter: `ISC001`. To avoid unexpected behavior, we recommend disabling these rules, either by removing them from the `select` or `extend-select` configuration, or adding them to the `ignore` configuration.<br>21 files left unchanged<br>PS C:\kode\medium\python-demo-medium&gt; python -m ruff check .<br>src\core\sentry\sentry_wrapper.py:10:18: ANN101 Missing type annotation for `self` in method<br>src\core\sentry\sentry_wrapper.py:24:27: ANN101 Missing type annotation for `self` in method<br>src\core\utils\logger.py:14:27: ANN001 Missing type annotation for function argument `file_name`<br>Found 3 errors.</pre><p><strong>Implementation of Sentry.io<br></strong>Depending on your Python setup Sentry has different impementations e.g. for Django or Flask. For this is a project i have written a <em>sentry-wrapper</em>.</p><pre>import os<br>import sentry_sdk<br><br>from dotenv import load_dotenv<br><br>&quot;&quot;&quot;Generic wrapper class for implementing Sentry&quot;&quot;&quot;<br><br><br>class SentryWrapper:<br>    def __init__(self) -&gt; None:<br>        load_dotenv()<br><br>        sentry_sdk.init(<br>            dsn=os.environ.get(&quot;SENTRY_DSN&quot;),<br>            max_breadcrumbs=50,<br>            debug=False,<br>            enable_tracing=True,<br>            attach_stacktrace=True,<br>            traces_sample_rate=1.0,<br>            profiles_sample_rate=1.0,<br>            environment=os.getenv(&quot;ENVIRONMENT&quot;),<br>        )<br><br>    def capture_exception(self, e: any) -&gt; None:<br>        sentry_sdk.capture_exception(e)<br>        print(e)</pre><p>Usage of Sentry to catch exceptions and errors could be implemented like this.</p><pre>from core.sentry.sentry_wrapper import SentryWrapper<br><br>def main() -&gt; None:<br>    try:<br>        division_by_zero = 1 / 0<br>        print(division_by_zero)<br>    except Exception as e:<br>        SentryWrapper().capture_exception(e)<br><br><br>if __name__ == &quot;__main__&quot;:<br>    main()</pre><p><strong>Create Github Action pipeline<br></strong>For my Github Action i would like the following; Formatting of code, linting of code and testing of code. This should be done on all <em>pull_requests </em>to assure standards are met — furthermore if changes to the code break tests or fauly implementations, this is a good place to notice it.</p><p>The github pipeline only commit code changes via <a href="https://github.com/stefanzweifel/git-auto-commit-action"><em>stefanzweifel/git-auto-commit-action@v5</em></a> if our tests does not fail.</p><p>For the Ruff linting part, I have enabled ‘continue-on-error,’ hence some of the notations can be false positives due to strict or not-yet-implemented rules.</p><pre>name: lint-and-commit<br><br>on: [pull_request]<br><br>jobs:<br><br>  build:<br><br>    # Determine ubuntu<br>    runs-on: ubuntu-latest<br><br>    # Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.<br>    permissions:<br>      contents: write<br>      pull-requests: write<br><br>    steps:<br>      - uses: actions/checkout@v4<br>      - name: Set up Python<br>        # This is the version of the action for setting up Python, not the Python version.<br>        uses: actions/setup-python@v4<br>        with:<br>          # Semantic version range syntax or exact version of a Python version<br>          python-version: &#39;3.x&#39;<br>          # Optional - x64 or x86 architecture, defaults to x64<br>          architecture: &#39;x64&#39;<br>          # Setup cache<br>          cache: &#39;pip&#39;<br>      - name: Display Python version<br>        run: python -c &quot;import sys; print(sys.version)&quot;<br>      - name: Installs Python Project<br>        run: python -m pip install . <br>      - name: Run Ruff code analysis<br>        run: python -m ruff check --fix<br>        continue-on-error: true<br>      - name: Run Ruff code formatter<br>        run: python -m ruff format <br>      - name: Run tests<br>        run: python -m pytest <br>      - name: Ruff automatic commit message<br>        uses: stefanzweifel/git-auto-commit-action@v5<br>        with:<br>          commit_message: &#39;Linting and formatting by Ruff 💻❤️🐍&#39;</pre><p>I have included a success and error action. If We take a look at the details of the failed action, it’s caused by the Ruff linter is throwing an error caused by invalid characters(“ &lt;&lt; “) in a script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EDuGCA1IXpRI_StZfIjRUw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DsmvCP4yyPDNWh0i-wfE0Q.png" /></figure><p><strong>GitHub pull request template<br></strong>A neat feature in Github is pull request templates. This assures a unified format for features to the codebase. In the GitHub repo you can find the pull_request_template.md file. This can be tailored for your needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*DKl_N7xqngXbhqrnJ2D1WA.png" /><figcaption>Pull request template</figcaption></figure><p><strong>Wrap up<br></strong>From the above, we have now covered how to set up a basic Python project, without Django or Flask, including code formatting and linting. Furthermore, there is a GitHub Action that runs on every pull request to ensure standards are met and tests are passing.</p><p>Improvements to the demo repository could be including a basic docker image, so all developers are using the same setup. Furthermore a debate to use a framework like Django could accelerate development. And of course more complex code tasks and test cases for demonstration. Lastly, additional programming paradigms could be implemented, e.g. SOLID, OOP, Reactive, or event-driven — perhaps in additional posts.</p><p>Feel free to drop a comment or suggestions. 😊</p><p>Best regards</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20a344c5c5f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>