tggl


Nametggl JSON
Version 1.1.2 PyPI version JSON
download
home_page
SummaryTggl python client
upload_time2023-04-21 16:17:18
maintainer
docs_urlNone
author
requires_python
license
keywords tggl feature flag
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Tggl Python Client

## Install
Intall the package using the package manager of your choice:
```
pip install tggl
```

## Quick Start
```python
from tggl import TgglClient

client = TgglClient('<Your API key>')

flags = client.eval_context({
    'user_id': 123,
    'email': 'foo@gmail.com',
    'plan': 'PRO'
})

# On/Off flags
if (flags.is_active('feature_1')):
    print('Feature 1 is active')

# A/B tests
if (flags.get('feature_2') == 'Variation A'):
    print('Should display variation A to user')

# A/B test with default value
if (flags.get('feature_2', 'Variation A') == 'Variation B'):
    print('Should display variation B to user')
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "tggl",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Tggl,feature flag",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/53/a9/5442d3c68e148dd93c285b57579c3e5e532356798d9bd16527a45357b8d6/tggl-1.1.2.tar.gz",
    "platform": null,
    "description": "# Tggl Python Client\n\n## Install\nIntall the package using the package manager of your choice:\n```\npip install tggl\n```\n\n## Quick Start\n```python\nfrom tggl import TgglClient\n\nclient = TgglClient('<Your API key>')\n\nflags = client.eval_context({\n    'user_id': 123,\n    'email': 'foo@gmail.com',\n    'plan': 'PRO'\n})\n\n# On/Off flags\nif (flags.is_active('feature_1')):\n    print('Feature 1 is active')\n\n# A/B tests\nif (flags.get('feature_2') == 'Variation A'):\n    print('Should display variation A to user')\n\n# A/B test with default value\nif (flags.get('feature_2', 'Variation A') == 'Variation B'):\n    print('Should display variation B to user')\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Tggl python client",
    "version": "1.1.2",
    "split_keywords": [
        "tggl",
        "feature flag"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "53a95442d3c68e148dd93c285b57579c3e5e532356798d9bd16527a45357b8d6",
                "md5": "b743c390388e995555695a6127c8ea6a",
                "sha256": "560c304e4ddec2d8530d559a4aec3434e831d7e140bc3d925a62f5934d94877d"
            },
            "downloads": -1,
            "filename": "tggl-1.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "b743c390388e995555695a6127c8ea6a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 1915,
            "upload_time": "2023-04-21T16:17:18",
            "upload_time_iso_8601": "2023-04-21T16:17:18.152684Z",
            "url": "https://files.pythonhosted.org/packages/53/a9/5442d3c68e148dd93c285b57579c3e5e532356798d9bd16527a45357b8d6/tggl-1.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-21 16:17:18",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "tggl"
}
        
Elapsed time: 2.26064s