#tutorial
Tag
-
A beginner's guide to managing Kubernetes resources in Python with kr8s
Managing Kubernetes resources with Python has never been easier thanks to the
kr8s
Kubernetes client for Python. -
Branding your open source Python package
Having a brand can help give your open source project some legitimacy, and you don’t need to be a designer to see these benefits. However it is important to understand that you do not need to add branding to your project in order for it to be successful, and adding branding can even harm your project.
-
Building a contributor community for your open source project
With our open source project published on GitHub we probably want to allow folks to contribute changes. Some users of the project may find bugs, or desire extra features and will open issues to tell you. Users who have the skills required to make that change can open a Pull Request on GitHub to propose it. As the maintainer you can then review and merge those changes.
-
Communicating with your open source community
Once your open source Python project has users and a community you will likely want to communicate with them in an official capacity. Perhaps you want to tell them about a new release, show a use case where someone is using your tool or solicit feedback on an upcoming feature.
-
Building a user community for your open source project
Now that our open source Python project exists and users can install it we will want to turn our attention to sustainability, reach and ongoing maintenance. By putting it out there and gaining users you are opening yourself up to questions, bug reports and feature requests.
-
Documenting Python projects with Sphinx and Read the Docs
In part four of this series we discussed documenting our code as we went along by adding docstrings throughout out project. In this post we will see that effort pay off by building a documentation site using Sphinx which will leverage all of our existing docstrings.
-
Automating releases of Python packages with GitHub Actions
In this post we will cover automatically packaging and releasing our project when a new git tag is pushed to GitHub.
-
Testing and Continuous Integration for Python packages with GitHub Actions
In this post we will cover automatically running our tests when we push new code to GitHub, and when contributors raise Pull Requests against our project.
-
Awaitable Objects and Async Context Managers in Python
Python objects are synchronous by default. When working with
asyncio
if we create an object the__init__
is a regular function and we cannot do any async work in here. -
Test driven development in Python
What is test driven development (TDD)?
Test driven development is a style of development where you write your tests before you write your code.
-
Testing your Python package
In this post we will cover testing our code.
Testing
There are many many great resources out there for learning about testing software. In this post I’m going to try and focus on simple examples that you can use to get started quickly. Once you have a good foundation for your tests you can then dive into mocking, replaying HTTP requests or even hypothesis testing.
-
Documenting your Python code
This post will cover documenting our code. Specifically adding documentation within the code itself.
Docstrings
Right now our code is undocumented, so if the user inspects our function they will only see the interface (the way you call it) but with no other context. We can use IPython to quickly inspect this.
-
Publishing open source Python packages on GitHub, PyPI and Conda Forge
In this post we will cover making our code available to people. This is the bit where we open the source! We will push our code to a code posting platform and then package up our library and submit it to a couple of repositories to make it easy for people to install.
-
Versioning and formatting your Python code
In this post, we will cover a few project hygiene things that we may want to put into place to make our lives easier in the future.
-
Testing static sites with Lighthouse CI and GitHub Actions
Feb 13, 2020 7 minute read #python, #github, #tutorial, #github-actions, #static-sites, #lighthouse-ciWhen you build a website you want pages to load as quickly as possible for users. Google has a tool called PageSpeed Insights which you can run on your website to see various metrics about the page. I’ve used it in the past while working on my blog and other sites.
-
Creating an open source Python project from scratch
Have you had a great idea for an open-source Python library that you think people will find useful, but you don’t know where to begin in creating and publishing it?
-
Creating GitHub Actions in Python
Note: This post is also available in Go flavour.
GitHub Actions provide a way to automate your software development workflows on GitHub. This includes traditional CI/CD tasks on all three major operating systems such as running test suites, building applications and publishing packages. But it also includes automated greetings for new contributors, labelling pull requests based on the files changed, or even creating cron jobs to perform scheduled tasks.
-
Creating GitHub Actions in Go
Note: This post is also available in Python flavour.
GitHub Actions provide a way to automate your software development workflows on GitHub. This includes traditional CI/CD tasks on all three major operating systems such as running test suites, building applications and publishing packages. But it also includes automated greetings for new contributors, labelling pull requests based on the files changed, or even creating cron jobs to perform scheduled tasks.
-
Interactive Docker containers
Interactive shell
In this post we are going to create a container we can interact with. We can then have a poke around inside the container and see what it is and how it works.
-
Running a Docker container
Installing Docker
Installing Docker on your machine is required but beyond the scope of this series. Getting Docker up and running is an ever evolving and improving process and anything put here will go stale reasonably quickly. As Docker uses linux kernel features you will need a running linux operating system. Therefore installing Docker on linux is easy, however installing it on Windows and Mac involve running a lightweight linux virtual machine.
-
What is Docker?
Welcome to the first post in ‘Intro to Docker’, a series I’m writing to get beginners started with Docker. Each post in this series will be no more than a 5 minute read and will cover exactly one topic surrounding Docker.
-
Convert tweet hashtags, at-tags and urls to links with PHP and Regular Expressions
Now of course if you’re using the Twitter API you can use Twitter entities but in this tutorial we’re going to use regular expressions.