flipt-migrate


Nameflipt-migrate JSON
Version 0.1.2 PyPI version JSON
download
home_page
SummaryA CLI tool to migrate feature flags from one source (e.g. competitor) to Flipt
upload_time2023-09-06 16:42:26
maintainer
docs_urlNone
authorFlipt Devs
requires_python>=3.11,<4.0
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Flipt Migrator

This is a tool to migrate feature flags from one source (e.g. competitor) to [Flipt](https://github.com/flipt-io/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](https://www.flipt.io/docs/configuration/storage#local).

## 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

```shell
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 key
- `LAUNCHDARKLY_PROJECT_KEY` - The LaunchDarkly project key to export (optional)

## Contributing

### Conventional Commits

We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for commit messages. This allows us to automatically generate a changelog and releases with [Release Please](https://github.com/googleapis/release-please).

### Adding a New Source

To add a new source, you will need to create a new class that inherits from [`Transformer`](./flipt_migrate/transformer.py) and implements the `transform` method. The `transform` method should return a `Collection` which maps to the Flipt [state model](https://www.flipt.io/docs/configuration/storage#defining-flag-state).

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`](./flipt_migrate/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](https://python-poetry.org/) to manage dependencies and packaging.

### Setup

```shell
poetry install
```

### Run

```shell
poetry run python flipt_migrate/main.py
```

### Format/Lint

We use [black](https://black.readthedocs.io/en/stable/) for linting and formatting.

```shell
poetry run black .
```


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "flipt-migrate",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Flipt Devs",
    "author_email": "dev@flipt.io",
    "download_url": "https://files.pythonhosted.org/packages/25/cd/b6033a85e09e4389482105fa143353eaf980e7f41f2c6d354d3d9a0eaec2/flipt_migrate-0.1.2.tar.gz",
    "platform": null,
    "description": "# Flipt Migrator\n\nThis is a tool to migrate feature flags from one source (e.g. competitor) to [Flipt](https://github.com/flipt-io/flipt).\n\nIt 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](https://www.flipt.io/docs/configuration/storage#local).\n\n## Disclaimer\n\n: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.\n\nThe 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.\n\nNo 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.\n\n## Legal\n\n: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.\n\n## Usage\n\n```shell\nusage: flipt-migrate [-h] [--source {LaunchDarkly}] [--out OUT]\n\nMigrate from a feature flag source to Flipt.\n\noptions:\n  -h, --help            show this help message and exit\n  --source {LaunchDarkly}\n                        The source to migrate from.\n  --out OUT             The location to export Flipt data. Defaults to current directory.\n```\n\n## Sources\n\n### LaunchDarkly\n\nTo export feature flags from LaunchDarkly, you will need to set the following environment variables or you will be prompted for them:\n\n- `LAUNCHDARKLY_API_KEY` - Your LaunchDarkly API key\n- `LAUNCHDARKLY_PROJECT_KEY` - The LaunchDarkly project key to export (optional)\n\n## Contributing\n\n### Conventional Commits\n\nWe use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for commit messages. This allows us to automatically generate a changelog and releases with [Release Please](https://github.com/googleapis/release-please).\n\n### Adding a New Source\n\nTo add a new source, you will need to create a new class that inherits from [`Transformer`](./flipt_migrate/transformer.py) and implements the `transform` method. The `transform` method should return a `Collection` which maps to the Flipt [state model](https://www.flipt.io/docs/configuration/storage#defining-flag-state).\n\nOnce you have created the new source, you will need to add it to the `SOURCES` dictionary to load the necessary `Transformer` in [`main.py`](./flipt_migrate/main.py).\n\nThe `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.\n\n## Development\n\nWe use [Poetry](https://python-poetry.org/) to manage dependencies and packaging.\n\n### Setup\n\n```shell\npoetry install\n```\n\n### Run\n\n```shell\npoetry run python flipt_migrate/main.py\n```\n\n### Format/Lint\n\nWe use [black](https://black.readthedocs.io/en/stable/) for linting and formatting.\n\n```shell\npoetry run black .\n```\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "A CLI tool to migrate feature flags from one source (e.g. competitor) to Flipt",
    "version": "0.1.2",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f60d3790a0734cbab206711b89729e588dc27cac06f0d1e1d502ac58cc7e443b",
                "md5": "dfbd086baecae818b16e83ee1b20cae9",
                "sha256": "83a49705e2bd6de4b4c1833c97511ecd6c4bd75604d4fb6b31b729cbb183c85c"
            },
            "downloads": -1,
            "filename": "flipt_migrate-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dfbd086baecae818b16e83ee1b20cae9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4.0",
            "size": 11110,
            "upload_time": "2023-09-06T16:42:24",
            "upload_time_iso_8601": "2023-09-06T16:42:24.222454Z",
            "url": "https://files.pythonhosted.org/packages/f6/0d/3790a0734cbab206711b89729e588dc27cac06f0d1e1d502ac58cc7e443b/flipt_migrate-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "25cdb6033a85e09e4389482105fa143353eaf980e7f41f2c6d354d3d9a0eaec2",
                "md5": "22fc22e678999ff2eb758a6b91b8387b",
                "sha256": "8b5bdc41a740a655a4b49ded5106dc1b14b58a504337c17f9e778840c0a7f90a"
            },
            "downloads": -1,
            "filename": "flipt_migrate-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "22fc22e678999ff2eb758a6b91b8387b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4.0",
            "size": 9141,
            "upload_time": "2023-09-06T16:42:26",
            "upload_time_iso_8601": "2023-09-06T16:42:26.011663Z",
            "url": "https://files.pythonhosted.org/packages/25/cd/b6033a85e09e4389482105fa143353eaf980e7f41f2c6d354d3d9a0eaec2/flipt_migrate-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-06 16:42:26",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "flipt-migrate"
}
        
Elapsed time: 0.56296s