The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Defining custom feature flags

Introduction

In this document the process of implementing custom feature flags is presented. In the subsequent sections we will create a feature flag that is enabled if it’s number field is odd.

Functions to be implemented

Each feature flag requires 1 function to be implemented:

However, it is recommended to additionally include:

Create feature flag function

Let’s start with a construction method that will use create a base feature flag, add the number field to it and assign it to the proper class.

Class checking function

Next, we will create a function checking the class attribute of the object.

is_enabled function

Finally, we define the is_enabled function which checks whether the number field of our flag is odd.

Now, let’s test if everything is working

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.