Skip to main content

March 2024 - Python v2

Welcome to our first set of release notes! We have a lot of exciting updates to share with you this month, including the release of v2 of our Python SDK generation and more. Let's dive in!

Python v2

A plushie llama holding a plushie Python logo

Hot off the presses is a new version of our Python SDK generation, focusing on usability, efficiency and developer experience.

  • Input casting - The cast_models feature will simplify the process of handling user input by automatically converting values into model instances. When passing data to a request, your SDK can convert dictionaries into models, and cast primitive types to their expected values, making it easier for your users to interact with your API.
  • Input validation - In OpenAPI you can define validation rules for input, such as the format of a string, or the range of a number. The Python SDK will now validate input data against these rules, and raise an exception if the data is invalid. This means if your user sends invalid data, they will get an error immediately, rather than waiting for the API to respond, meaning less erroneous calls to your API.
  • Output validation - As well as validating data on the way in, data is also validated on the way out. This means that if your API returns unexpected data, the SDK will raise an exception, rather than silently returning the data.
  • Improved docstrings - For your users to be successful with your SDK, they need to understand how to use it, and that comes down to documentation. We've improved how we add the documentation from your OpenAPI spec into your SDKs by supporting reST docstrings, improving the in-IDE documentation experience. This also allows you to generate Python SDK documentation using Sphinx.

You can read more details, including a deeper dive into some of these features in our Python v2 blog post. You can enable Python v2 in your SDK by setting the liblabVersion option for Python in your config file to "2".

note

Python v2 is a major version update, so there are breaking changes between SDKs generated with v1 and v2. We will be supporting both versions for the foreseeable future, so you can choose when to upgrade.

If you need help with the upgrade, please reach out either using out contact form or via our discord server.

Other improvements and bug fixes

We've been making a lot of improvements to liblab this month, adding more features and squashing the occasional bug. Here are some of the highlights:

SDK generation

Terraform provider generation

Automation

  • Published a new GitHub Action to the GitHub Actions marketplace to regenerate your SDKs when there is a new version of liblab released.

liblab portal

  • We unveiled new pricing (see more in our new pricing and sign up blog post) on March 11th. As part of this launch, we have extended the portal capabilities to allow super admins to manage tiers and billing from the liblab portal.
  • Audit trails can now be exported to CSV, allowing you to keep a record of all changes made to your organization.