A CLI tool to migrate feature flags from one source (e.g. competitor) to Flipt
Project description
Flipt Migrator
This is a tool to migrate feature flags from one source (e.g. competitor) to Flipt.
It works by exporting the feature flags from the source into a set of *.features.yml
files that can then be imported into Flipt or run as the source data with Flipt in 'local' mode.
Disclaimer
:warning: This tool is best effort and may not work for all use cases. Because of the differences in how feature flags are implemented across different sources and APIs, it is likely that some manual work will be required to get the feature flags into a state that works with Flipt after they have been exported.
The main goal of this tool is to make it easier to get started with Flipt by reducing the amount of manual work required to migrate from another source.
No guarantees are made about the correctness of the exported feature flags. It is recommended that you review the exported feature flags before importing them into Flipt.
Legal
:balance_scale: This tool is not affiliated with or endorsed by any of the sources it supports. All trademarks are the property of their respective owners.
Usage
usage: flipt-migrate [-h] [--source {LaunchDarkly}] [--out OUT]
Migrate from a feature flag source to Flipt.
options:
-h, --help show this help message and exit
--source {LaunchDarkly}
The source to migrate from.
--out OUT The location to export Flipt data. Defaults to current directory.
Sources
LaunchDarkly
To export feature flags from LaunchDarkly, you will need to set the following environment variables or you will be prompted for them:
LAUNCHDARKLY_API_KEY
- Your LaunchDarkly API keyLAUNCHDARKLY_PROJECT_KEY
- The LaunchDarkly project key to export (optional)
Contributing
Conventional Commits
We use Conventional Commits for commit messages. This allows us to automatically generate a changelog and releases with Release Please.
Adding a New Source
To add a new source, you will need to create a new class that inherits from Transformer
and implements the transform
method. The transform
method should return a Collection
which maps to the Flipt state model.
Once you have created the new source, you will need to add it to the SOURCES
dictionary to load the necessary Transformer
in main.py
.
The SOURCES
dictionary maps the source name to function which returns the implemented Transformer
class. The function is used to delay the import of the Transformer
class until it is needed as well as to allow each source to prompt for any necessary credentials or arguments.
Development
We use Poetry to manage dependencies and packaging.
Setup
poetry install
Run
poetry run python flipt_migrate/main.py
Format/Lint
We use black for linting and formatting.
poetry run black .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file flipt_migrate-0.1.2.tar.gz
.
File metadata
- Download URL: flipt_migrate-0.1.2.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b5bdc41a740a655a4b49ded5106dc1b14b58a504337c17f9e778840c0a7f90a |
|
MD5 | 22fc22e678999ff2eb758a6b91b8387b |
|
BLAKE2b-256 | 25cdb6033a85e09e4389482105fa143353eaf980e7f41f2c6d354d3d9a0eaec2 |
File details
Details for the file flipt_migrate-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: flipt_migrate-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83a49705e2bd6de4b4c1833c97511ecd6c4bd75604d4fb6b31b729cbb183c85c |
|
MD5 | dfbd086baecae818b16e83ee1b20cae9 |
|
BLAKE2b-256 | f60d3790a0734cbab206711b89729e588dc27cac06f0d1e1d502ac58cc7e443b |