├── .github └── workflows │ └── python-publish.yml ├── .gitignore ├── .swagger-codegen-ignore ├── .swagger-codegen └── VERSION ├── .travis.yml ├── Makefile ├── README.md ├── docs ├── Constraint.md ├── ConstraintApi.md ├── CreateConstraintRequest.md ├── CreateFlagRequest.md ├── CreateSegmentRequest.md ├── CreateTagRequest.md ├── CreateVariantRequest.md ├── Distribution.md ├── DistributionApi.md ├── Error.md ├── EvalContext.md ├── EvalDebugLog.md ├── EvalResult.md ├── EvaluationApi.md ├── EvaluationBatchRequest.md ├── EvaluationBatchResponse.md ├── EvaluationEntity.md ├── ExportApi.md ├── Flag.md ├── FlagApi.md ├── FlagSnapshot.md ├── Health.md ├── HealthApi.md ├── PutDistributionsRequest.md ├── PutFlagRequest.md ├── PutSegmentReorderRequest.md ├── PutSegmentRequest.md ├── PutVariantRequest.md ├── Segment.md ├── SegmentApi.md ├── SegmentDebugLog.md ├── SetFlagEnabledRequest.md ├── Tag.md ├── TagApi.md ├── Variant.md └── VariantApi.md ├── flagr ├── __init__.py ├── api │ ├── __init__.py │ ├── constraint_api.py │ ├── distribution_api.py │ ├── evaluation_api.py │ ├── export_api.py │ ├── flag_api.py │ ├── health_api.py │ ├── segment_api.py │ ├── tag_api.py │ └── variant_api.py ├── api_client.py ├── configuration.py ├── models │ ├── __init__.py │ ├── constraint.py │ ├── create_constraint_request.py │ ├── create_flag_request.py │ ├── create_segment_request.py │ ├── create_tag_request.py │ ├── create_variant_request.py │ ├── distribution.py │ ├── error.py │ ├── eval_context.py │ ├── eval_debug_log.py │ ├── eval_result.py │ ├── evaluation_batch_request.py │ ├── evaluation_batch_response.py │ ├── evaluation_entity.py │ ├── flag.py │ ├── flag_snapshot.py │ ├── health.py │ ├── put_distributions_request.py │ ├── put_flag_request.py │ ├── put_segment_reorder_request.py │ ├── put_segment_request.py │ ├── put_variant_request.py │ ├── segment.py │ ├── segment_debug_log.py │ ├── set_flag_enabled_request.py │ ├── tag.py │ └── variant.py └── rest.py ├── git_push.sh ├── requirements.txt ├── setup.py ├── swagger.yaml ├── swagger_py.json ├── test-requirements.txt ├── test ├── __init__.py ├── test_constraint.py ├── test_constraint_api.py ├── test_create_constraint_request.py ├── test_create_flag_request.py ├── test_create_segment_request.py ├── test_create_tag_request.py ├── test_create_variant_request.py ├── test_distribution.py ├── test_distribution_api.py ├── test_error.py ├── test_eval_context.py ├── test_eval_debug_log.py ├── test_eval_result.py ├── test_evaluation_api.py ├── test_evaluation_batch_request.py ├── test_evaluation_batch_response.py ├── test_evaluation_entity.py ├── test_export_api.py ├── test_flag.py ├── test_flag_api.py ├── test_flag_snapshot.py ├── test_health.py ├── test_health_api.py ├── test_put_distributions_request.py ├── test_put_flag_request.py ├── test_put_segment_reorder_request.py ├── test_put_segment_request.py ├── test_put_variant_request.py ├── test_segment.py ├── test_segment_api.py ├── test_segment_debug_log.py ├── test_set_flag_enabled_request.py ├── test_tag.py ├── test_tag_api.py ├── test_variant.py └── test_variant_api.py └── tox.ini /.github/workflows/python-publish.yml: -------------------------------------------------------------------------------- 1 | # This workflows will upload a Python Package using Twine when a release is created 2 | # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries 3 | 4 | name: Upload Python Package 5 | 6 | on: 7 | release: 8 | types: [published] 9 | 10 | jobs: 11 | deploy: 12 | 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v2 17 | - name: Set up Python 18 | uses: actions/setup-python@v2 19 | with: 20 | python-version: '3.x' 21 | - name: Install dependencies 22 | run: | 23 | python -m pip install --upgrade pip 24 | pip install setuptools wheel twine 25 | - name: Build and publish 26 | env: 27 | TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} 28 | TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} 29 | run: | 30 | python setup.py sdist bdist_wheel 31 | twine upload dist/* 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *,cover 46 | .hypothesis/ 47 | venv/ 48 | .python-version 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | 57 | # Sphinx documentation 58 | docs/_build/ 59 | 60 | # PyBuilder 61 | target/ 62 | 63 | #Ipython Notebook 64 | .ipynb_checkpoints 65 | -------------------------------------------------------------------------------- /.swagger-codegen-ignore: -------------------------------------------------------------------------------- 1 | # Swagger Codegen Ignore 2 | # Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /.swagger-codegen/VERSION: -------------------------------------------------------------------------------- 1 | 2.4.14 -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # ref: https://docs.travis-ci.com/user/languages/python 2 | language: python 3 | python: 4 | - "2.7" 5 | - "3.2" 6 | - "3.3" 7 | - "3.4" 8 | - "3.5" 9 | #- "3.5-dev" # 3.5 development branch 10 | #- "nightly" # points to the latest development branch e.g. 3.6-dev 11 | # command to install dependencies 12 | install: "pip install -r requirements.txt" 13 | # command to run tests 14 | script: nosetests 15 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | gen: 2 | docker run --rm -v ${PWD}:/local swaggerapi/swagger-codegen-cli generate \ 3 | -i /local/swagger.yaml \ 4 | -l python \ 5 | -o /local/ -c /local/swagger_py.json 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # flagr 2 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". 3 | 4 | This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: 5 | 6 | - API version: 1.1.10 7 | - Package version: 1.1.10 8 | - Build package: io.swagger.codegen.languages.PythonClientCodegen 9 | 10 | ## Requirements. 11 | 12 | Python 2.7 and 3.4+ 13 | 14 | ## Installation & Usage 15 | ### pip install 16 | 17 | If the python package is hosted on Github, you can install directly from Github 18 | 19 | ```sh 20 | pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git 21 | ``` 22 | (you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) 23 | 24 | Then import the package: 25 | ```python 26 | import flagr 27 | ``` 28 | 29 | ### Setuptools 30 | 31 | Install via [Setuptools](http://pypi.python.org/pypi/setuptools). 32 | 33 | ```sh 34 | python setup.py install --user 35 | ``` 36 | (or `sudo python setup.py install` to install the package for all users) 37 | 38 | Then import the package: 39 | ```python 40 | import flagr 41 | ``` 42 | 43 | ## Getting Started 44 | 45 | Please follow the [installation procedure](#installation--usage) and then run the following: 46 | 47 | ```python 48 | from __future__ import print_function 49 | import time 50 | import flagr 51 | from flagr.rest import ApiException 52 | from pprint import pprint 53 | 54 | # create an instance of the API class 55 | api_instance = flagr.ConstraintApi(flagr.ApiClient(configuration)) 56 | flag_id = 789 # int | numeric ID of the flag 57 | segment_id = 789 # int | numeric ID of the segment 58 | body = flagr.CreateConstraintRequest() # CreateConstraintRequest | create a constraint 59 | 60 | try: 61 | api_response = api_instance.create_constraint(flag_id, segment_id, body) 62 | pprint(api_response) 63 | except ApiException as e: 64 | print("Exception when calling ConstraintApi->create_constraint: %s\n" % e) 65 | 66 | ``` 67 | 68 | ## Documentation for API Endpoints 69 | 70 | All URIs are relative to *http://localhost/api/v1* 71 | 72 | Class | Method | HTTP request | Description 73 | ------------ | ------------- | ------------- | ------------- 74 | *ConstraintApi* | [**create_constraint**](docs/ConstraintApi.md#create_constraint) | **POST** /flags/{flagID}/segments/{segmentID}/constraints | 75 | *ConstraintApi* | [**delete_constraint**](docs/ConstraintApi.md#delete_constraint) | **DELETE** /flags/{flagID}/segments/{segmentID}/constraints/{constraintID} | 76 | *ConstraintApi* | [**find_constraints**](docs/ConstraintApi.md#find_constraints) | **GET** /flags/{flagID}/segments/{segmentID}/constraints | 77 | *ConstraintApi* | [**put_constraint**](docs/ConstraintApi.md#put_constraint) | **PUT** /flags/{flagID}/segments/{segmentID}/constraints/{constraintID} | 78 | *DistributionApi* | [**find_distributions**](docs/DistributionApi.md#find_distributions) | **GET** /flags/{flagID}/segments/{segmentID}/distributions | 79 | *DistributionApi* | [**put_distributions**](docs/DistributionApi.md#put_distributions) | **PUT** /flags/{flagID}/segments/{segmentID}/distributions | 80 | *EvaluationApi* | [**post_evaluation**](docs/EvaluationApi.md#post_evaluation) | **POST** /evaluation | 81 | *EvaluationApi* | [**post_evaluation_batch**](docs/EvaluationApi.md#post_evaluation_batch) | **POST** /evaluation/batch | 82 | *ExportApi* | [**get_export_eval_cache_json**](docs/ExportApi.md#get_export_eval_cache_json) | **GET** /export/eval_cache/json | 83 | *ExportApi* | [**get_export_sqlite**](docs/ExportApi.md#get_export_sqlite) | **GET** /export/sqlite | 84 | *FlagApi* | [**create_flag**](docs/FlagApi.md#create_flag) | **POST** /flags | 85 | *FlagApi* | [**delete_flag**](docs/FlagApi.md#delete_flag) | **DELETE** /flags/{flagID} | 86 | *FlagApi* | [**find_flags**](docs/FlagApi.md#find_flags) | **GET** /flags | 87 | *FlagApi* | [**get_flag**](docs/FlagApi.md#get_flag) | **GET** /flags/{flagID} | 88 | *FlagApi* | [**get_flag_entity_types**](docs/FlagApi.md#get_flag_entity_types) | **GET** /flags/entity_types | 89 | *FlagApi* | [**get_flag_snapshots**](docs/FlagApi.md#get_flag_snapshots) | **GET** /flags/{flagID}/snapshots | 90 | *FlagApi* | [**put_flag**](docs/FlagApi.md#put_flag) | **PUT** /flags/{flagID} | 91 | *FlagApi* | [**set_flag_enabled**](docs/FlagApi.md#set_flag_enabled) | **PUT** /flags/{flagID}/enabled | 92 | *HealthApi* | [**get_health**](docs/HealthApi.md#get_health) | **GET** /health | 93 | *SegmentApi* | [**create_segment**](docs/SegmentApi.md#create_segment) | **POST** /flags/{flagID}/segments | 94 | *SegmentApi* | [**delete_segment**](docs/SegmentApi.md#delete_segment) | **DELETE** /flags/{flagID}/segments/{segmentID} | 95 | *SegmentApi* | [**find_segments**](docs/SegmentApi.md#find_segments) | **GET** /flags/{flagID}/segments | 96 | *SegmentApi* | [**put_segment**](docs/SegmentApi.md#put_segment) | **PUT** /flags/{flagID}/segments/{segmentID} | 97 | *SegmentApi* | [**put_segments_reorder**](docs/SegmentApi.md#put_segments_reorder) | **PUT** /flags/{flagID}/segments/reorder | 98 | *TagApi* | [**create_tag**](docs/TagApi.md#create_tag) | **POST** /flags/{flagID}/tags | 99 | *TagApi* | [**delete_tag**](docs/TagApi.md#delete_tag) | **DELETE** /flags/{flagID}/tags/{tagID} | 100 | *TagApi* | [**find_all_tags**](docs/TagApi.md#find_all_tags) | **GET** /tags | 101 | *TagApi* | [**find_tags**](docs/TagApi.md#find_tags) | **GET** /flags/{flagID}/tags | 102 | *VariantApi* | [**create_variant**](docs/VariantApi.md#create_variant) | **POST** /flags/{flagID}/variants | 103 | *VariantApi* | [**delete_variant**](docs/VariantApi.md#delete_variant) | **DELETE** /flags/{flagID}/variants/{variantID} | 104 | *VariantApi* | [**find_variants**](docs/VariantApi.md#find_variants) | **GET** /flags/{flagID}/variants | 105 | *VariantApi* | [**put_variant**](docs/VariantApi.md#put_variant) | **PUT** /flags/{flagID}/variants/{variantID} | 106 | 107 | 108 | ## Documentation For Models 109 | 110 | - [Constraint](docs/Constraint.md) 111 | - [CreateConstraintRequest](docs/CreateConstraintRequest.md) 112 | - [CreateFlagRequest](docs/CreateFlagRequest.md) 113 | - [CreateSegmentRequest](docs/CreateSegmentRequest.md) 114 | - [CreateTagRequest](docs/CreateTagRequest.md) 115 | - [CreateVariantRequest](docs/CreateVariantRequest.md) 116 | - [Distribution](docs/Distribution.md) 117 | - [Error](docs/Error.md) 118 | - [EvalContext](docs/EvalContext.md) 119 | - [EvalDebugLog](docs/EvalDebugLog.md) 120 | - [EvalResult](docs/EvalResult.md) 121 | - [EvaluationBatchRequest](docs/EvaluationBatchRequest.md) 122 | - [EvaluationBatchResponse](docs/EvaluationBatchResponse.md) 123 | - [EvaluationEntity](docs/EvaluationEntity.md) 124 | - [Flag](docs/Flag.md) 125 | - [FlagSnapshot](docs/FlagSnapshot.md) 126 | - [Health](docs/Health.md) 127 | - [PutDistributionsRequest](docs/PutDistributionsRequest.md) 128 | - [PutFlagRequest](docs/PutFlagRequest.md) 129 | - [PutSegmentReorderRequest](docs/PutSegmentReorderRequest.md) 130 | - [PutSegmentRequest](docs/PutSegmentRequest.md) 131 | - [PutVariantRequest](docs/PutVariantRequest.md) 132 | - [Segment](docs/Segment.md) 133 | - [SegmentDebugLog](docs/SegmentDebugLog.md) 134 | - [SetFlagEnabledRequest](docs/SetFlagEnabledRequest.md) 135 | - [Tag](docs/Tag.md) 136 | - [Variant](docs/Variant.md) 137 | 138 | 139 | ## Documentation For Authorization 140 | 141 | All endpoints do not require authorization. 142 | 143 | 144 | ## Author 145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /docs/Constraint.md: -------------------------------------------------------------------------------- 1 | # Constraint 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **int** | | [optional] 7 | **_property** | **str** | | 8 | **operator** | **str** | | 9 | **value** | **str** | | 10 | 11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/ConstraintApi.md: -------------------------------------------------------------------------------- 1 | # flagr.ConstraintApi 2 | 3 | All URIs are relative to *http://localhost/api/v1* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**create_constraint**](ConstraintApi.md#create_constraint) | **POST** /flags/{flagID}/segments/{segmentID}/constraints | 8 | [**delete_constraint**](ConstraintApi.md#delete_constraint) | **DELETE** /flags/{flagID}/segments/{segmentID}/constraints/{constraintID} | 9 | [**find_constraints**](ConstraintApi.md#find_constraints) | **GET** /flags/{flagID}/segments/{segmentID}/constraints | 10 | [**put_constraint**](ConstraintApi.md#put_constraint) | **PUT** /flags/{flagID}/segments/{segmentID}/constraints/{constraintID} | 11 | 12 | 13 | # **create_constraint** 14 | > Constraint create_constraint(flag_id, segment_id, body) 15 | 16 | 17 | 18 | ### Example 19 | ```python 20 | from __future__ import print_function 21 | import time 22 | import flagr 23 | from flagr.rest import ApiException 24 | from pprint import pprint 25 | 26 | # create an instance of the API class 27 | api_instance = flagr.ConstraintApi() 28 | flag_id = 789 # int | numeric ID of the flag 29 | segment_id = 789 # int | numeric ID of the segment 30 | body = flagr.CreateConstraintRequest() # CreateConstraintRequest | create a constraint 31 | 32 | try: 33 | api_response = api_instance.create_constraint(flag_id, segment_id, body) 34 | pprint(api_response) 35 | except ApiException as e: 36 | print("Exception when calling ConstraintApi->create_constraint: %s\n" % e) 37 | ``` 38 | 39 | ### Parameters 40 | 41 | Name | Type | Description | Notes 42 | ------------- | ------------- | ------------- | ------------- 43 | **flag_id** | **int**| numeric ID of the flag | 44 | **segment_id** | **int**| numeric ID of the segment | 45 | **body** | [**CreateConstraintRequest**](CreateConstraintRequest.md)| create a constraint | 46 | 47 | ### Return type 48 | 49 | [**Constraint**](Constraint.md) 50 | 51 | ### Authorization 52 | 53 | No authorization required 54 | 55 | ### HTTP request headers 56 | 57 | - **Content-Type**: application/json 58 | - **Accept**: application/json 59 | 60 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 61 | 62 | # **delete_constraint** 63 | > delete_constraint(flag_id, segment_id, constraint_id) 64 | 65 | 66 | 67 | ### Example 68 | ```python 69 | from __future__ import print_function 70 | import time 71 | import flagr 72 | from flagr.rest import ApiException 73 | from pprint import pprint 74 | 75 | # create an instance of the API class 76 | api_instance = flagr.ConstraintApi() 77 | flag_id = 789 # int | numeric ID of the flag 78 | segment_id = 789 # int | numeric ID of the segment 79 | constraint_id = 789 # int | numeric ID of the constraint 80 | 81 | try: 82 | api_instance.delete_constraint(flag_id, segment_id, constraint_id) 83 | except ApiException as e: 84 | print("Exception when calling ConstraintApi->delete_constraint: %s\n" % e) 85 | ``` 86 | 87 | ### Parameters 88 | 89 | Name | Type | Description | Notes 90 | ------------- | ------------- | ------------- | ------------- 91 | **flag_id** | **int**| numeric ID of the flag | 92 | **segment_id** | **int**| numeric ID of the segment | 93 | **constraint_id** | **int**| numeric ID of the constraint | 94 | 95 | ### Return type 96 | 97 | void (empty response body) 98 | 99 | ### Authorization 100 | 101 | No authorization required 102 | 103 | ### HTTP request headers 104 | 105 | - **Content-Type**: application/json 106 | - **Accept**: application/json 107 | 108 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 109 | 110 | # **find_constraints** 111 | > list[Constraint] find_constraints(flag_id, segment_id) 112 | 113 | 114 | 115 | ### Example 116 | ```python 117 | from __future__ import print_function 118 | import time 119 | import flagr 120 | from flagr.rest import ApiException 121 | from pprint import pprint 122 | 123 | # create an instance of the API class 124 | api_instance = flagr.ConstraintApi() 125 | flag_id = 789 # int | numeric ID of the flag 126 | segment_id = 789 # int | numeric ID of the segment 127 | 128 | try: 129 | api_response = api_instance.find_constraints(flag_id, segment_id) 130 | pprint(api_response) 131 | except ApiException as e: 132 | print("Exception when calling ConstraintApi->find_constraints: %s\n" % e) 133 | ``` 134 | 135 | ### Parameters 136 | 137 | Name | Type | Description | Notes 138 | ------------- | ------------- | ------------- | ------------- 139 | **flag_id** | **int**| numeric ID of the flag | 140 | **segment_id** | **int**| numeric ID of the segment | 141 | 142 | ### Return type 143 | 144 | [**list[Constraint]**](Constraint.md) 145 | 146 | ### Authorization 147 | 148 | No authorization required 149 | 150 | ### HTTP request headers 151 | 152 | - **Content-Type**: application/json 153 | - **Accept**: application/json 154 | 155 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 156 | 157 | # **put_constraint** 158 | > Constraint put_constraint(flag_id, segment_id, constraint_id, body) 159 | 160 | 161 | 162 | ### Example 163 | ```python 164 | from __future__ import print_function 165 | import time 166 | import flagr 167 | from flagr.rest import ApiException 168 | from pprint import pprint 169 | 170 | # create an instance of the API class 171 | api_instance = flagr.ConstraintApi() 172 | flag_id = 789 # int | numeric ID of the flag 173 | segment_id = 789 # int | numeric ID of the segment 174 | constraint_id = 789 # int | numeric ID of the constraint 175 | body = flagr.CreateConstraintRequest() # CreateConstraintRequest | create a constraint 176 | 177 | try: 178 | api_response = api_instance.put_constraint(flag_id, segment_id, constraint_id, body) 179 | pprint(api_response) 180 | except ApiException as e: 181 | print("Exception when calling ConstraintApi->put_constraint: %s\n" % e) 182 | ``` 183 | 184 | ### Parameters 185 | 186 | Name | Type | Description | Notes 187 | ------------- | ------------- | ------------- | ------------- 188 | **flag_id** | **int**| numeric ID of the flag | 189 | **segment_id** | **int**| numeric ID of the segment | 190 | **constraint_id** | **int**| numeric ID of the constraint | 191 | **body** | [**CreateConstraintRequest**](CreateConstraintRequest.md)| create a constraint | 192 | 193 | ### Return type 194 | 195 | [**Constraint**](Constraint.md) 196 | 197 | ### Authorization 198 | 199 | No authorization required 200 | 201 | ### HTTP request headers 202 | 203 | - **Content-Type**: application/json 204 | - **Accept**: application/json 205 | 206 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 207 | 208 | -------------------------------------------------------------------------------- /docs/CreateConstraintRequest.md: -------------------------------------------------------------------------------- 1 | # CreateConstraintRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **_property** | **str** | | 7 | **operator** | **str** | | 8 | **value** | **str** | | 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/CreateFlagRequest.md: -------------------------------------------------------------------------------- 1 | # CreateFlagRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **description** | **str** | | 7 | **key** | **str** | unique key representation of the flag | [optional] 8 | **template** | **str** | template for flag creation | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/CreateSegmentRequest.md: -------------------------------------------------------------------------------- 1 | # CreateSegmentRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **description** | **str** | | 7 | **rollout_percent** | **int** | | 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/CreateTagRequest.md: -------------------------------------------------------------------------------- 1 | # CreateTagRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **value** | **str** | | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/CreateVariantRequest.md: -------------------------------------------------------------------------------- 1 | # CreateVariantRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **key** | **str** | | 7 | **attachment** | **object** | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/Distribution.md: -------------------------------------------------------------------------------- 1 | # Distribution 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **int** | | [optional] 7 | **percent** | **int** | | 8 | **variant_key** | **str** | | 9 | **variant_id** | **int** | | 10 | 11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/DistributionApi.md: -------------------------------------------------------------------------------- 1 | # flagr.DistributionApi 2 | 3 | All URIs are relative to *http://localhost/api/v1* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**find_distributions**](DistributionApi.md#find_distributions) | **GET** /flags/{flagID}/segments/{segmentID}/distributions | 8 | [**put_distributions**](DistributionApi.md#put_distributions) | **PUT** /flags/{flagID}/segments/{segmentID}/distributions | 9 | 10 | 11 | # **find_distributions** 12 | > list[Distribution] find_distributions(flag_id, segment_id) 13 | 14 | 15 | 16 | ### Example 17 | ```python 18 | from __future__ import print_function 19 | import time 20 | import flagr 21 | from flagr.rest import ApiException 22 | from pprint import pprint 23 | 24 | # create an instance of the API class 25 | api_instance = flagr.DistributionApi() 26 | flag_id = 789 # int | numeric ID of the flag 27 | segment_id = 789 # int | numeric ID of the segment 28 | 29 | try: 30 | api_response = api_instance.find_distributions(flag_id, segment_id) 31 | pprint(api_response) 32 | except ApiException as e: 33 | print("Exception when calling DistributionApi->find_distributions: %s\n" % e) 34 | ``` 35 | 36 | ### Parameters 37 | 38 | Name | Type | Description | Notes 39 | ------------- | ------------- | ------------- | ------------- 40 | **flag_id** | **int**| numeric ID of the flag | 41 | **segment_id** | **int**| numeric ID of the segment | 42 | 43 | ### Return type 44 | 45 | [**list[Distribution]**](Distribution.md) 46 | 47 | ### Authorization 48 | 49 | No authorization required 50 | 51 | ### HTTP request headers 52 | 53 | - **Content-Type**: application/json 54 | - **Accept**: application/json 55 | 56 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 57 | 58 | # **put_distributions** 59 | > list[Distribution] put_distributions(flag_id, segment_id, body) 60 | 61 | 62 | 63 | replace the distribution with the new setting 64 | 65 | ### Example 66 | ```python 67 | from __future__ import print_function 68 | import time 69 | import flagr 70 | from flagr.rest import ApiException 71 | from pprint import pprint 72 | 73 | # create an instance of the API class 74 | api_instance = flagr.DistributionApi() 75 | flag_id = 789 # int | numeric ID of the flag 76 | segment_id = 789 # int | numeric ID of the segment 77 | body = flagr.PutDistributionsRequest() # PutDistributionsRequest | array of distributions 78 | 79 | try: 80 | api_response = api_instance.put_distributions(flag_id, segment_id, body) 81 | pprint(api_response) 82 | except ApiException as e: 83 | print("Exception when calling DistributionApi->put_distributions: %s\n" % e) 84 | ``` 85 | 86 | ### Parameters 87 | 88 | Name | Type | Description | Notes 89 | ------------- | ------------- | ------------- | ------------- 90 | **flag_id** | **int**| numeric ID of the flag | 91 | **segment_id** | **int**| numeric ID of the segment | 92 | **body** | [**PutDistributionsRequest**](PutDistributionsRequest.md)| array of distributions | 93 | 94 | ### Return type 95 | 96 | [**list[Distribution]**](Distribution.md) 97 | 98 | ### Authorization 99 | 100 | No authorization required 101 | 102 | ### HTTP request headers 103 | 104 | - **Content-Type**: application/json 105 | - **Accept**: application/json 106 | 107 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 108 | 109 | -------------------------------------------------------------------------------- /docs/Error.md: -------------------------------------------------------------------------------- 1 | # Error 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **message** | **str** | | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/EvalContext.md: -------------------------------------------------------------------------------- 1 | # EvalContext 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **entity_id** | **str** | entityID is used to deterministically at random to evaluate the flag result. If it's empty, flagr will randomly generate one. | [optional] 7 | **entity_type** | **str** | | [optional] 8 | **entity_context** | **object** | | [optional] 9 | **enable_debug** | **bool** | | [optional] 10 | **flag_id** | **int** | flagID | [optional] 11 | **flag_key** | **str** | flagKey. flagID or flagKey will resolve to the same flag. Either works. | [optional] 12 | **flag_tags** | **list[str]** | flagTags. flagTags looks up flags by tag. Either works. | [optional] 13 | 14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/EvalDebugLog.md: -------------------------------------------------------------------------------- 1 | # EvalDebugLog 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **segment_debug_logs** | [**list[SegmentDebugLog]**](SegmentDebugLog.md) | | [optional] 7 | **msg** | **str** | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/EvalResult.md: -------------------------------------------------------------------------------- 1 | # EvalResult 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **flag_id** | **int** | | [optional] 7 | **flag_key** | **str** | | [optional] 8 | **flag_snapshot_id** | **int** | | [optional] 9 | **segment_id** | **int** | | [optional] 10 | **variant_id** | **int** | | [optional] 11 | **variant_key** | **str** | | [optional] 12 | **variant_attachment** | **object** | | [optional] 13 | **eval_context** | [**EvalContext**](EvalContext.md) | | [optional] 14 | **timestamp** | **str** | | [optional] 15 | **eval_debug_log** | [**EvalDebugLog**](EvalDebugLog.md) | | [optional] 16 | 17 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/EvaluationApi.md: -------------------------------------------------------------------------------- 1 | # flagr.EvaluationApi 2 | 3 | All URIs are relative to *http://localhost/api/v1* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**post_evaluation**](EvaluationApi.md#post_evaluation) | **POST** /evaluation | 8 | [**post_evaluation_batch**](EvaluationApi.md#post_evaluation_batch) | **POST** /evaluation/batch | 9 | 10 | 11 | # **post_evaluation** 12 | > EvalResult post_evaluation(body) 13 | 14 | 15 | 16 | ### Example 17 | ```python 18 | from __future__ import print_function 19 | import time 20 | import flagr 21 | from flagr.rest import ApiException 22 | from pprint import pprint 23 | 24 | # create an instance of the API class 25 | api_instance = flagr.EvaluationApi() 26 | body = flagr.EvalContext() # EvalContext | evalution context 27 | 28 | try: 29 | api_response = api_instance.post_evaluation(body) 30 | pprint(api_response) 31 | except ApiException as e: 32 | print("Exception when calling EvaluationApi->post_evaluation: %s\n" % e) 33 | ``` 34 | 35 | ### Parameters 36 | 37 | Name | Type | Description | Notes 38 | ------------- | ------------- | ------------- | ------------- 39 | **body** | [**EvalContext**](EvalContext.md)| evalution context | 40 | 41 | ### Return type 42 | 43 | [**EvalResult**](EvalResult.md) 44 | 45 | ### Authorization 46 | 47 | No authorization required 48 | 49 | ### HTTP request headers 50 | 51 | - **Content-Type**: application/json 52 | - **Accept**: application/json 53 | 54 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 55 | 56 | # **post_evaluation_batch** 57 | > EvaluationBatchResponse post_evaluation_batch(body) 58 | 59 | 60 | 61 | ### Example 62 | ```python 63 | from __future__ import print_function 64 | import time 65 | import flagr 66 | from flagr.rest import ApiException 67 | from pprint import pprint 68 | 69 | # create an instance of the API class 70 | api_instance = flagr.EvaluationApi() 71 | body = flagr.EvaluationBatchRequest() # EvaluationBatchRequest | evalution batch request 72 | 73 | try: 74 | api_response = api_instance.post_evaluation_batch(body) 75 | pprint(api_response) 76 | except ApiException as e: 77 | print("Exception when calling EvaluationApi->post_evaluation_batch: %s\n" % e) 78 | ``` 79 | 80 | ### Parameters 81 | 82 | Name | Type | Description | Notes 83 | ------------- | ------------- | ------------- | ------------- 84 | **body** | [**EvaluationBatchRequest**](EvaluationBatchRequest.md)| evalution batch request | 85 | 86 | ### Return type 87 | 88 | [**EvaluationBatchResponse**](EvaluationBatchResponse.md) 89 | 90 | ### Authorization 91 | 92 | No authorization required 93 | 94 | ### HTTP request headers 95 | 96 | - **Content-Type**: application/json 97 | - **Accept**: application/json 98 | 99 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 100 | 101 | -------------------------------------------------------------------------------- /docs/EvaluationBatchRequest.md: -------------------------------------------------------------------------------- 1 | # EvaluationBatchRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **entities** | [**list[EvaluationEntity]**](EvaluationEntity.md) | | 7 | **enable_debug** | **bool** | | [optional] 8 | **flag_i_ds** | **list[int]** | flagIDs | [optional] 9 | **flag_keys** | **list[str]** | flagKeys. Either flagIDs, flagKeys or flagTags works. If pass in multiples, Flagr may return duplicate results. | [optional] 10 | **flag_tags** | **list[str]** | flagTags. Either flagIDs, flagKeys or flagTags works. If pass in multiples, Flagr may return duplicate results. | [optional] 11 | 12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/EvaluationBatchResponse.md: -------------------------------------------------------------------------------- 1 | # EvaluationBatchResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **evaluation_results** | [**list[EvalResult]**](EvalResult.md) | | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/EvaluationEntity.md: -------------------------------------------------------------------------------- 1 | # EvaluationEntity 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **entity_id** | **str** | | [optional] 7 | **entity_type** | **str** | | [optional] 8 | **entity_context** | **object** | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/ExportApi.md: -------------------------------------------------------------------------------- 1 | # flagr.ExportApi 2 | 3 | All URIs are relative to *http://localhost/api/v1* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**get_export_eval_cache_json**](ExportApi.md#get_export_eval_cache_json) | **GET** /export/eval_cache/json | 8 | [**get_export_sqlite**](ExportApi.md#get_export_sqlite) | **GET** /export/sqlite | 9 | 10 | 11 | # **get_export_eval_cache_json** 12 | > object get_export_eval_cache_json() 13 | 14 | 15 | 16 | Export JSON format of the eval cache dump 17 | 18 | ### Example 19 | ```python 20 | from __future__ import print_function 21 | import time 22 | import flagr 23 | from flagr.rest import ApiException 24 | from pprint import pprint 25 | 26 | # create an instance of the API class 27 | api_instance = flagr.ExportApi() 28 | 29 | try: 30 | api_response = api_instance.get_export_eval_cache_json() 31 | pprint(api_response) 32 | except ApiException as e: 33 | print("Exception when calling ExportApi->get_export_eval_cache_json: %s\n" % e) 34 | ``` 35 | 36 | ### Parameters 37 | This endpoint does not need any parameter. 38 | 39 | ### Return type 40 | 41 | **object** 42 | 43 | ### Authorization 44 | 45 | No authorization required 46 | 47 | ### HTTP request headers 48 | 49 | - **Content-Type**: application/json 50 | - **Accept**: application/json 51 | 52 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 53 | 54 | # **get_export_sqlite** 55 | > file get_export_sqlite(exclude_snapshots=exclude_snapshots) 56 | 57 | 58 | 59 | Export sqlite3 format of the db dump, which is converted from the main database. 60 | 61 | ### Example 62 | ```python 63 | from __future__ import print_function 64 | import time 65 | import flagr 66 | from flagr.rest import ApiException 67 | from pprint import pprint 68 | 69 | # create an instance of the API class 70 | api_instance = flagr.ExportApi() 71 | exclude_snapshots = true # bool | export without snapshots data - useful for smaller db without snapshots (optional) 72 | 73 | try: 74 | api_response = api_instance.get_export_sqlite(exclude_snapshots=exclude_snapshots) 75 | pprint(api_response) 76 | except ApiException as e: 77 | print("Exception when calling ExportApi->get_export_sqlite: %s\n" % e) 78 | ``` 79 | 80 | ### Parameters 81 | 82 | Name | Type | Description | Notes 83 | ------------- | ------------- | ------------- | ------------- 84 | **exclude_snapshots** | **bool**| export without snapshots data - useful for smaller db without snapshots | [optional] 85 | 86 | ### Return type 87 | 88 | [**file**](file.md) 89 | 90 | ### Authorization 91 | 92 | No authorization required 93 | 94 | ### HTTP request headers 95 | 96 | - **Content-Type**: application/json 97 | - **Accept**: application/octet-stream 98 | 99 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 100 | 101 | -------------------------------------------------------------------------------- /docs/Flag.md: -------------------------------------------------------------------------------- 1 | # Flag 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **int** | | [optional] 7 | **key** | **str** | unique key representation of the flag | [optional] 8 | **description** | **str** | | 9 | **enabled** | **bool** | | 10 | **tags** | [**list[Tag]**](Tag.md) | | [optional] 11 | **segments** | [**list[Segment]**](Segment.md) | | [optional] 12 | **variants** | [**list[Variant]**](Variant.md) | | [optional] 13 | **data_records_enabled** | **bool** | enabled data records will get data logging in the metrics pipeline, for example, kafka. | 14 | **entity_type** | **str** | it will override the entityType in the evaluation logs if it's not empty | [optional] 15 | **notes** | **str** | flag usage details in markdown format | [optional] 16 | **created_by** | **str** | | [optional] 17 | **updated_by** | **str** | | [optional] 18 | **updated_at** | **datetime** | | [optional] 19 | 20 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/FlagSnapshot.md: -------------------------------------------------------------------------------- 1 | # FlagSnapshot 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **int** | | 7 | **updated_by** | **str** | | [optional] 8 | **flag** | [**Flag**](Flag.md) | | 9 | **updated_at** | **str** | | 10 | 11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/Health.md: -------------------------------------------------------------------------------- 1 | # Health 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **status** | **str** | | [optional] 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/HealthApi.md: -------------------------------------------------------------------------------- 1 | # flagr.HealthApi 2 | 3 | All URIs are relative to *http://localhost/api/v1* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**get_health**](HealthApi.md#get_health) | **GET** /health | 8 | 9 | 10 | # **get_health** 11 | > Health get_health() 12 | 13 | 14 | 15 | Check if Flagr is healthy 16 | 17 | ### Example 18 | ```python 19 | from __future__ import print_function 20 | import time 21 | import flagr 22 | from flagr.rest import ApiException 23 | from pprint import pprint 24 | 25 | # create an instance of the API class 26 | api_instance = flagr.HealthApi() 27 | 28 | try: 29 | api_response = api_instance.get_health() 30 | pprint(api_response) 31 | except ApiException as e: 32 | print("Exception when calling HealthApi->get_health: %s\n" % e) 33 | ``` 34 | 35 | ### Parameters 36 | This endpoint does not need any parameter. 37 | 38 | ### Return type 39 | 40 | [**Health**](Health.md) 41 | 42 | ### Authorization 43 | 44 | No authorization required 45 | 46 | ### HTTP request headers 47 | 48 | - **Content-Type**: application/json 49 | - **Accept**: application/json 50 | 51 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 52 | 53 | -------------------------------------------------------------------------------- /docs/PutDistributionsRequest.md: -------------------------------------------------------------------------------- 1 | # PutDistributionsRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **distributions** | [**list[Distribution]**](Distribution.md) | | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/PutFlagRequest.md: -------------------------------------------------------------------------------- 1 | # PutFlagRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **description** | **str** | | [optional] 7 | **data_records_enabled** | **bool** | enabled data records will get data logging in the metrics pipeline, for example, kafka. | [optional] 8 | **entity_type** | **str** | it will overwrite entityType into evaluation logs if it's not empty | [optional] 9 | **enabled** | **bool** | | [optional] 10 | **key** | **str** | | [optional] 11 | **notes** | **str** | | [optional] 12 | 13 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/PutSegmentReorderRequest.md: -------------------------------------------------------------------------------- 1 | # PutSegmentReorderRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **segment_i_ds** | **list[int]** | | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/PutSegmentRequest.md: -------------------------------------------------------------------------------- 1 | # PutSegmentRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **description** | **str** | | 7 | **rollout_percent** | **int** | | 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/PutVariantRequest.md: -------------------------------------------------------------------------------- 1 | # PutVariantRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **key** | **str** | | 7 | **attachment** | **object** | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/Segment.md: -------------------------------------------------------------------------------- 1 | # Segment 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **int** | | [optional] 7 | **description** | **str** | | 8 | **constraints** | [**list[Constraint]**](Constraint.md) | | [optional] 9 | **distributions** | [**list[Distribution]**](Distribution.md) | | [optional] 10 | **rank** | **int** | | 11 | **rollout_percent** | **int** | | 12 | 13 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/SegmentDebugLog.md: -------------------------------------------------------------------------------- 1 | # SegmentDebugLog 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **segment_id** | **int** | | [optional] 7 | **msg** | **str** | | [optional] 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/SetFlagEnabledRequest.md: -------------------------------------------------------------------------------- 1 | # SetFlagEnabledRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **enabled** | **bool** | | 7 | 8 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Tag.md: -------------------------------------------------------------------------------- 1 | # Tag 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **int** | | [optional] 7 | **value** | **str** | | 8 | 9 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/TagApi.md: -------------------------------------------------------------------------------- 1 | # flagr.TagApi 2 | 3 | All URIs are relative to *http://localhost/api/v1* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**create_tag**](TagApi.md#create_tag) | **POST** /flags/{flagID}/tags | 8 | [**delete_tag**](TagApi.md#delete_tag) | **DELETE** /flags/{flagID}/tags/{tagID} | 9 | [**find_all_tags**](TagApi.md#find_all_tags) | **GET** /tags | 10 | [**find_tags**](TagApi.md#find_tags) | **GET** /flags/{flagID}/tags | 11 | 12 | 13 | # **create_tag** 14 | > Tag create_tag(flag_id, body) 15 | 16 | 17 | 18 | ### Example 19 | ```python 20 | from __future__ import print_function 21 | import time 22 | import flagr 23 | from flagr.rest import ApiException 24 | from pprint import pprint 25 | 26 | # create an instance of the API class 27 | api_instance = flagr.TagApi() 28 | flag_id = 789 # int | numeric ID of the flag 29 | body = flagr.CreateTagRequest() # CreateTagRequest | create a tag 30 | 31 | try: 32 | api_response = api_instance.create_tag(flag_id, body) 33 | pprint(api_response) 34 | except ApiException as e: 35 | print("Exception when calling TagApi->create_tag: %s\n" % e) 36 | ``` 37 | 38 | ### Parameters 39 | 40 | Name | Type | Description | Notes 41 | ------------- | ------------- | ------------- | ------------- 42 | **flag_id** | **int**| numeric ID of the flag | 43 | **body** | [**CreateTagRequest**](CreateTagRequest.md)| create a tag | 44 | 45 | ### Return type 46 | 47 | [**Tag**](Tag.md) 48 | 49 | ### Authorization 50 | 51 | No authorization required 52 | 53 | ### HTTP request headers 54 | 55 | - **Content-Type**: application/json 56 | - **Accept**: application/json 57 | 58 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 59 | 60 | # **delete_tag** 61 | > delete_tag(flag_id, tag_id) 62 | 63 | 64 | 65 | ### Example 66 | ```python 67 | from __future__ import print_function 68 | import time 69 | import flagr 70 | from flagr.rest import ApiException 71 | from pprint import pprint 72 | 73 | # create an instance of the API class 74 | api_instance = flagr.TagApi() 75 | flag_id = 789 # int | numeric ID of the flag 76 | tag_id = 789 # int | numeric ID of the tag 77 | 78 | try: 79 | api_instance.delete_tag(flag_id, tag_id) 80 | except ApiException as e: 81 | print("Exception when calling TagApi->delete_tag: %s\n" % e) 82 | ``` 83 | 84 | ### Parameters 85 | 86 | Name | Type | Description | Notes 87 | ------------- | ------------- | ------------- | ------------- 88 | **flag_id** | **int**| numeric ID of the flag | 89 | **tag_id** | **int**| numeric ID of the tag | 90 | 91 | ### Return type 92 | 93 | void (empty response body) 94 | 95 | ### Authorization 96 | 97 | No authorization required 98 | 99 | ### HTTP request headers 100 | 101 | - **Content-Type**: application/json 102 | - **Accept**: application/json 103 | 104 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 105 | 106 | # **find_all_tags** 107 | > list[Tag] find_all_tags(limit=limit, offset=offset, value_like=value_like) 108 | 109 | 110 | 111 | ### Example 112 | ```python 113 | from __future__ import print_function 114 | import time 115 | import flagr 116 | from flagr.rest import ApiException 117 | from pprint import pprint 118 | 119 | # create an instance of the API class 120 | api_instance = flagr.TagApi() 121 | limit = 789 # int | the numbers of tags to return (optional) 122 | offset = 789 # int | return tags given the offset, it should usually set together with limit (optional) 123 | value_like = 'value_like_example' # str | return tags partially matching given value (optional) 124 | 125 | try: 126 | api_response = api_instance.find_all_tags(limit=limit, offset=offset, value_like=value_like) 127 | pprint(api_response) 128 | except ApiException as e: 129 | print("Exception when calling TagApi->find_all_tags: %s\n" % e) 130 | ``` 131 | 132 | ### Parameters 133 | 134 | Name | Type | Description | Notes 135 | ------------- | ------------- | ------------- | ------------- 136 | **limit** | **int**| the numbers of tags to return | [optional] 137 | **offset** | **int**| return tags given the offset, it should usually set together with limit | [optional] 138 | **value_like** | **str**| return tags partially matching given value | [optional] 139 | 140 | ### Return type 141 | 142 | [**list[Tag]**](Tag.md) 143 | 144 | ### Authorization 145 | 146 | No authorization required 147 | 148 | ### HTTP request headers 149 | 150 | - **Content-Type**: application/json 151 | - **Accept**: application/json 152 | 153 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 154 | 155 | # **find_tags** 156 | > list[Tag] find_tags(flag_id) 157 | 158 | 159 | 160 | ### Example 161 | ```python 162 | from __future__ import print_function 163 | import time 164 | import flagr 165 | from flagr.rest import ApiException 166 | from pprint import pprint 167 | 168 | # create an instance of the API class 169 | api_instance = flagr.TagApi() 170 | flag_id = 789 # int | numeric ID of the flag 171 | 172 | try: 173 | api_response = api_instance.find_tags(flag_id) 174 | pprint(api_response) 175 | except ApiException as e: 176 | print("Exception when calling TagApi->find_tags: %s\n" % e) 177 | ``` 178 | 179 | ### Parameters 180 | 181 | Name | Type | Description | Notes 182 | ------------- | ------------- | ------------- | ------------- 183 | **flag_id** | **int**| numeric ID of the flag | 184 | 185 | ### Return type 186 | 187 | [**list[Tag]**](Tag.md) 188 | 189 | ### Authorization 190 | 191 | No authorization required 192 | 193 | ### HTTP request headers 194 | 195 | - **Content-Type**: application/json 196 | - **Accept**: application/json 197 | 198 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 199 | 200 | -------------------------------------------------------------------------------- /docs/Variant.md: -------------------------------------------------------------------------------- 1 | # Variant 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **int** | | [optional] 7 | **key** | **str** | | 8 | **attachment** | **object** | | [optional] 9 | 10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/VariantApi.md: -------------------------------------------------------------------------------- 1 | # flagr.VariantApi 2 | 3 | All URIs are relative to *http://localhost/api/v1* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**create_variant**](VariantApi.md#create_variant) | **POST** /flags/{flagID}/variants | 8 | [**delete_variant**](VariantApi.md#delete_variant) | **DELETE** /flags/{flagID}/variants/{variantID} | 9 | [**find_variants**](VariantApi.md#find_variants) | **GET** /flags/{flagID}/variants | 10 | [**put_variant**](VariantApi.md#put_variant) | **PUT** /flags/{flagID}/variants/{variantID} | 11 | 12 | 13 | # **create_variant** 14 | > Variant create_variant(flag_id, body) 15 | 16 | 17 | 18 | ### Example 19 | ```python 20 | from __future__ import print_function 21 | import time 22 | import flagr 23 | from flagr.rest import ApiException 24 | from pprint import pprint 25 | 26 | # create an instance of the API class 27 | api_instance = flagr.VariantApi() 28 | flag_id = 789 # int | numeric ID of the flag 29 | body = flagr.CreateVariantRequest() # CreateVariantRequest | create a variant 30 | 31 | try: 32 | api_response = api_instance.create_variant(flag_id, body) 33 | pprint(api_response) 34 | except ApiException as e: 35 | print("Exception when calling VariantApi->create_variant: %s\n" % e) 36 | ``` 37 | 38 | ### Parameters 39 | 40 | Name | Type | Description | Notes 41 | ------------- | ------------- | ------------- | ------------- 42 | **flag_id** | **int**| numeric ID of the flag | 43 | **body** | [**CreateVariantRequest**](CreateVariantRequest.md)| create a variant | 44 | 45 | ### Return type 46 | 47 | [**Variant**](Variant.md) 48 | 49 | ### Authorization 50 | 51 | No authorization required 52 | 53 | ### HTTP request headers 54 | 55 | - **Content-Type**: application/json 56 | - **Accept**: application/json 57 | 58 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 59 | 60 | # **delete_variant** 61 | > delete_variant(flag_id, variant_id) 62 | 63 | 64 | 65 | ### Example 66 | ```python 67 | from __future__ import print_function 68 | import time 69 | import flagr 70 | from flagr.rest import ApiException 71 | from pprint import pprint 72 | 73 | # create an instance of the API class 74 | api_instance = flagr.VariantApi() 75 | flag_id = 789 # int | numeric ID of the flag 76 | variant_id = 789 # int | numeric ID of the variant 77 | 78 | try: 79 | api_instance.delete_variant(flag_id, variant_id) 80 | except ApiException as e: 81 | print("Exception when calling VariantApi->delete_variant: %s\n" % e) 82 | ``` 83 | 84 | ### Parameters 85 | 86 | Name | Type | Description | Notes 87 | ------------- | ------------- | ------------- | ------------- 88 | **flag_id** | **int**| numeric ID of the flag | 89 | **variant_id** | **int**| numeric ID of the variant | 90 | 91 | ### Return type 92 | 93 | void (empty response body) 94 | 95 | ### Authorization 96 | 97 | No authorization required 98 | 99 | ### HTTP request headers 100 | 101 | - **Content-Type**: application/json 102 | - **Accept**: application/json 103 | 104 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 105 | 106 | # **find_variants** 107 | > list[Variant] find_variants(flag_id) 108 | 109 | 110 | 111 | ### Example 112 | ```python 113 | from __future__ import print_function 114 | import time 115 | import flagr 116 | from flagr.rest import ApiException 117 | from pprint import pprint 118 | 119 | # create an instance of the API class 120 | api_instance = flagr.VariantApi() 121 | flag_id = 789 # int | numeric ID of the flag 122 | 123 | try: 124 | api_response = api_instance.find_variants(flag_id) 125 | pprint(api_response) 126 | except ApiException as e: 127 | print("Exception when calling VariantApi->find_variants: %s\n" % e) 128 | ``` 129 | 130 | ### Parameters 131 | 132 | Name | Type | Description | Notes 133 | ------------- | ------------- | ------------- | ------------- 134 | **flag_id** | **int**| numeric ID of the flag | 135 | 136 | ### Return type 137 | 138 | [**list[Variant]**](Variant.md) 139 | 140 | ### Authorization 141 | 142 | No authorization required 143 | 144 | ### HTTP request headers 145 | 146 | - **Content-Type**: application/json 147 | - **Accept**: application/json 148 | 149 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 150 | 151 | # **put_variant** 152 | > Variant put_variant(flag_id, variant_id, body) 153 | 154 | 155 | 156 | ### Example 157 | ```python 158 | from __future__ import print_function 159 | import time 160 | import flagr 161 | from flagr.rest import ApiException 162 | from pprint import pprint 163 | 164 | # create an instance of the API class 165 | api_instance = flagr.VariantApi() 166 | flag_id = 789 # int | numeric ID of the flag 167 | variant_id = 789 # int | numeric ID of the variant 168 | body = flagr.PutVariantRequest() # PutVariantRequest | update a variant 169 | 170 | try: 171 | api_response = api_instance.put_variant(flag_id, variant_id, body) 172 | pprint(api_response) 173 | except ApiException as e: 174 | print("Exception when calling VariantApi->put_variant: %s\n" % e) 175 | ``` 176 | 177 | ### Parameters 178 | 179 | Name | Type | Description | Notes 180 | ------------- | ------------- | ------------- | ------------- 181 | **flag_id** | **int**| numeric ID of the flag | 182 | **variant_id** | **int**| numeric ID of the variant | 183 | **body** | [**PutVariantRequest**](PutVariantRequest.md)| update a variant | 184 | 185 | ### Return type 186 | 187 | [**Variant**](Variant.md) 188 | 189 | ### Authorization 190 | 191 | No authorization required 192 | 193 | ### HTTP request headers 194 | 195 | - **Content-Type**: application/json 196 | - **Accept**: application/json 197 | 198 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) 199 | 200 | -------------------------------------------------------------------------------- /flagr/__init__.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | # flake8: noqa 4 | 5 | """ 6 | Flagr 7 | 8 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 9 | 10 | OpenAPI spec version: 1.1.10 11 | 12 | Generated by: https://github.com/swagger-api/swagger-codegen.git 13 | """ 14 | 15 | 16 | from __future__ import absolute_import 17 | 18 | # import apis into sdk package 19 | from flagr.api.constraint_api import ConstraintApi 20 | from flagr.api.distribution_api import DistributionApi 21 | from flagr.api.evaluation_api import EvaluationApi 22 | from flagr.api.export_api import ExportApi 23 | from flagr.api.flag_api import FlagApi 24 | from flagr.api.health_api import HealthApi 25 | from flagr.api.segment_api import SegmentApi 26 | from flagr.api.tag_api import TagApi 27 | from flagr.api.variant_api import VariantApi 28 | 29 | # import ApiClient 30 | from flagr.api_client import ApiClient 31 | from flagr.configuration import Configuration 32 | # import models into sdk package 33 | from flagr.models.constraint import Constraint 34 | from flagr.models.create_constraint_request import CreateConstraintRequest 35 | from flagr.models.create_flag_request import CreateFlagRequest 36 | from flagr.models.create_segment_request import CreateSegmentRequest 37 | from flagr.models.create_tag_request import CreateTagRequest 38 | from flagr.models.create_variant_request import CreateVariantRequest 39 | from flagr.models.distribution import Distribution 40 | from flagr.models.error import Error 41 | from flagr.models.eval_context import EvalContext 42 | from flagr.models.eval_debug_log import EvalDebugLog 43 | from flagr.models.eval_result import EvalResult 44 | from flagr.models.evaluation_batch_request import EvaluationBatchRequest 45 | from flagr.models.evaluation_batch_response import EvaluationBatchResponse 46 | from flagr.models.evaluation_entity import EvaluationEntity 47 | from flagr.models.flag import Flag 48 | from flagr.models.flag_snapshot import FlagSnapshot 49 | from flagr.models.health import Health 50 | from flagr.models.put_distributions_request import PutDistributionsRequest 51 | from flagr.models.put_flag_request import PutFlagRequest 52 | from flagr.models.put_segment_reorder_request import PutSegmentReorderRequest 53 | from flagr.models.put_segment_request import PutSegmentRequest 54 | from flagr.models.put_variant_request import PutVariantRequest 55 | from flagr.models.segment import Segment 56 | from flagr.models.segment_debug_log import SegmentDebugLog 57 | from flagr.models.set_flag_enabled_request import SetFlagEnabledRequest 58 | from flagr.models.tag import Tag 59 | from flagr.models.variant import Variant 60 | -------------------------------------------------------------------------------- /flagr/api/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | # flake8: noqa 4 | 5 | # import apis into api package 6 | from flagr.api.constraint_api import ConstraintApi 7 | from flagr.api.distribution_api import DistributionApi 8 | from flagr.api.evaluation_api import EvaluationApi 9 | from flagr.api.export_api import ExportApi 10 | from flagr.api.flag_api import FlagApi 11 | from flagr.api.health_api import HealthApi 12 | from flagr.api.segment_api import SegmentApi 13 | from flagr.api.tag_api import TagApi 14 | from flagr.api.variant_api import VariantApi 15 | -------------------------------------------------------------------------------- /flagr/api/health_api.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import re # noqa: F401 17 | 18 | # python 2 and python 3 compatibility library 19 | import six 20 | 21 | from flagr.api_client import ApiClient 22 | 23 | 24 | class HealthApi(object): 25 | """NOTE: This class is auto generated by the swagger code generator program. 26 | 27 | Do not edit the class manually. 28 | Ref: https://github.com/swagger-api/swagger-codegen 29 | """ 30 | 31 | def __init__(self, api_client=None): 32 | if api_client is None: 33 | api_client = ApiClient() 34 | self.api_client = api_client 35 | 36 | def get_health(self, **kwargs): # noqa: E501 37 | """get_health # noqa: E501 38 | 39 | Check if Flagr is healthy # noqa: E501 40 | This method makes a synchronous HTTP request by default. To make an 41 | asynchronous HTTP request, please pass async_req=True 42 | >>> thread = api.get_health(async_req=True) 43 | >>> result = thread.get() 44 | 45 | :param async_req bool 46 | :return: Health 47 | If the method is called asynchronously, 48 | returns the request thread. 49 | """ 50 | kwargs['_return_http_data_only'] = True 51 | if kwargs.get('async_req'): 52 | return self.get_health_with_http_info(**kwargs) # noqa: E501 53 | else: 54 | (data) = self.get_health_with_http_info(**kwargs) # noqa: E501 55 | return data 56 | 57 | def get_health_with_http_info(self, **kwargs): # noqa: E501 58 | """get_health # noqa: E501 59 | 60 | Check if Flagr is healthy # noqa: E501 61 | This method makes a synchronous HTTP request by default. To make an 62 | asynchronous HTTP request, please pass async_req=True 63 | >>> thread = api.get_health_with_http_info(async_req=True) 64 | >>> result = thread.get() 65 | 66 | :param async_req bool 67 | :return: Health 68 | If the method is called asynchronously, 69 | returns the request thread. 70 | """ 71 | 72 | all_params = [] # noqa: E501 73 | all_params.append('async_req') 74 | all_params.append('_return_http_data_only') 75 | all_params.append('_preload_content') 76 | all_params.append('_request_timeout') 77 | 78 | params = locals() 79 | for key, val in six.iteritems(params['kwargs']): 80 | if key not in all_params: 81 | raise TypeError( 82 | "Got an unexpected keyword argument '%s'" 83 | " to method get_health" % key 84 | ) 85 | params[key] = val 86 | del params['kwargs'] 87 | 88 | collection_formats = {} 89 | 90 | path_params = {} 91 | 92 | query_params = [] 93 | 94 | header_params = {} 95 | 96 | form_params = [] 97 | local_var_files = {} 98 | 99 | body_params = None 100 | # HTTP header `Accept` 101 | header_params['Accept'] = self.api_client.select_header_accept( 102 | ['application/json']) # noqa: E501 103 | 104 | # HTTP header `Content-Type` 105 | header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 106 | ['application/json']) # noqa: E501 107 | 108 | # Authentication setting 109 | auth_settings = [] # noqa: E501 110 | 111 | return self.api_client.call_api( 112 | '/health', 'GET', 113 | path_params, 114 | query_params, 115 | header_params, 116 | body=body_params, 117 | post_params=form_params, 118 | files=local_var_files, 119 | response_type='Health', # noqa: E501 120 | auth_settings=auth_settings, 121 | async_req=params.get('async_req'), 122 | _return_http_data_only=params.get('_return_http_data_only'), 123 | _preload_content=params.get('_preload_content', True), 124 | _request_timeout=params.get('_request_timeout'), 125 | collection_formats=collection_formats) 126 | -------------------------------------------------------------------------------- /flagr/models/__init__.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | # flake8: noqa 4 | """ 5 | Flagr 6 | 7 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 8 | 9 | OpenAPI spec version: 1.1.10 10 | 11 | Generated by: https://github.com/swagger-api/swagger-codegen.git 12 | """ 13 | 14 | 15 | from __future__ import absolute_import 16 | 17 | # import models into model package 18 | from flagr.models.constraint import Constraint 19 | from flagr.models.create_constraint_request import CreateConstraintRequest 20 | from flagr.models.create_flag_request import CreateFlagRequest 21 | from flagr.models.create_segment_request import CreateSegmentRequest 22 | from flagr.models.create_tag_request import CreateTagRequest 23 | from flagr.models.create_variant_request import CreateVariantRequest 24 | from flagr.models.distribution import Distribution 25 | from flagr.models.error import Error 26 | from flagr.models.eval_context import EvalContext 27 | from flagr.models.eval_debug_log import EvalDebugLog 28 | from flagr.models.eval_result import EvalResult 29 | from flagr.models.evaluation_batch_request import EvaluationBatchRequest 30 | from flagr.models.evaluation_batch_response import EvaluationBatchResponse 31 | from flagr.models.evaluation_entity import EvaluationEntity 32 | from flagr.models.flag import Flag 33 | from flagr.models.flag_snapshot import FlagSnapshot 34 | from flagr.models.health import Health 35 | from flagr.models.put_distributions_request import PutDistributionsRequest 36 | from flagr.models.put_flag_request import PutFlagRequest 37 | from flagr.models.put_segment_reorder_request import PutSegmentReorderRequest 38 | from flagr.models.put_segment_request import PutSegmentRequest 39 | from flagr.models.put_variant_request import PutVariantRequest 40 | from flagr.models.segment import Segment 41 | from flagr.models.segment_debug_log import SegmentDebugLog 42 | from flagr.models.set_flag_enabled_request import SetFlagEnabledRequest 43 | from flagr.models.tag import Tag 44 | from flagr.models.variant import Variant 45 | -------------------------------------------------------------------------------- /flagr/models/constraint.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class Constraint(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'id': 'int', 35 | '_property': 'str', 36 | 'operator': 'str', 37 | 'value': 'str' 38 | } 39 | 40 | attribute_map = { 41 | 'id': 'id', 42 | '_property': 'property', 43 | 'operator': 'operator', 44 | 'value': 'value' 45 | } 46 | 47 | def __init__(self, id=None, _property=None, operator=None, value=None): # noqa: E501 48 | """Constraint - a model defined in Swagger""" # noqa: E501 49 | 50 | self._id = None 51 | self.__property = None 52 | self._operator = None 53 | self._value = None 54 | self.discriminator = None 55 | 56 | if id is not None: 57 | self.id = id 58 | self._property = _property 59 | self.operator = operator 60 | self.value = value 61 | 62 | @property 63 | def id(self): 64 | """Gets the id of this Constraint. # noqa: E501 65 | 66 | 67 | :return: The id of this Constraint. # noqa: E501 68 | :rtype: int 69 | """ 70 | return self._id 71 | 72 | @id.setter 73 | def id(self, id): 74 | """Sets the id of this Constraint. 75 | 76 | 77 | :param id: The id of this Constraint. # noqa: E501 78 | :type: int 79 | """ 80 | if id is not None and id < 1: # noqa: E501 81 | raise ValueError("Invalid value for `id`, must be a value greater than or equal to `1`") # noqa: E501 82 | 83 | self._id = id 84 | 85 | @property 86 | def _property(self): 87 | """Gets the _property of this Constraint. # noqa: E501 88 | 89 | 90 | :return: The _property of this Constraint. # noqa: E501 91 | :rtype: str 92 | """ 93 | return self.__property 94 | 95 | @_property.setter 96 | def _property(self, _property): 97 | """Sets the _property of this Constraint. 98 | 99 | 100 | :param _property: The _property of this Constraint. # noqa: E501 101 | :type: str 102 | """ 103 | if _property is None: 104 | raise ValueError("Invalid value for `_property`, must not be `None`") # noqa: E501 105 | if _property is not None and len(_property) < 1: 106 | raise ValueError("Invalid value for `_property`, length must be greater than or equal to `1`") # noqa: E501 107 | 108 | self.__property = _property 109 | 110 | @property 111 | def operator(self): 112 | """Gets the operator of this Constraint. # noqa: E501 113 | 114 | 115 | :return: The operator of this Constraint. # noqa: E501 116 | :rtype: str 117 | """ 118 | return self._operator 119 | 120 | @operator.setter 121 | def operator(self, operator): 122 | """Sets the operator of this Constraint. 123 | 124 | 125 | :param operator: The operator of this Constraint. # noqa: E501 126 | :type: str 127 | """ 128 | if operator is None: 129 | raise ValueError("Invalid value for `operator`, must not be `None`") # noqa: E501 130 | allowed_values = ["EQ", "NEQ", "LT", "LTE", "GT", "GTE", "EREG", "NEREG", "IN", "NOTIN", "CONTAINS", "NOTCONTAINS"] # noqa: E501 131 | if operator not in allowed_values: 132 | raise ValueError( 133 | "Invalid value for `operator` ({0}), must be one of {1}" # noqa: E501 134 | .format(operator, allowed_values) 135 | ) 136 | 137 | self._operator = operator 138 | 139 | @property 140 | def value(self): 141 | """Gets the value of this Constraint. # noqa: E501 142 | 143 | 144 | :return: The value of this Constraint. # noqa: E501 145 | :rtype: str 146 | """ 147 | return self._value 148 | 149 | @value.setter 150 | def value(self, value): 151 | """Sets the value of this Constraint. 152 | 153 | 154 | :param value: The value of this Constraint. # noqa: E501 155 | :type: str 156 | """ 157 | if value is None: 158 | raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 159 | if value is not None and len(value) < 1: 160 | raise ValueError("Invalid value for `value`, length must be greater than or equal to `1`") # noqa: E501 161 | 162 | self._value = value 163 | 164 | def to_dict(self): 165 | """Returns the model properties as a dict""" 166 | result = {} 167 | 168 | for attr, _ in six.iteritems(self.swagger_types): 169 | value = getattr(self, attr) 170 | if isinstance(value, list): 171 | result[attr] = list(map( 172 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 173 | value 174 | )) 175 | elif hasattr(value, "to_dict"): 176 | result[attr] = value.to_dict() 177 | elif isinstance(value, dict): 178 | result[attr] = dict(map( 179 | lambda item: (item[0], item[1].to_dict()) 180 | if hasattr(item[1], "to_dict") else item, 181 | value.items() 182 | )) 183 | else: 184 | result[attr] = value 185 | if issubclass(Constraint, dict): 186 | for key, value in self.items(): 187 | result[key] = value 188 | 189 | return result 190 | 191 | def to_str(self): 192 | """Returns the string representation of the model""" 193 | return pprint.pformat(self.to_dict()) 194 | 195 | def __repr__(self): 196 | """For `print` and `pprint`""" 197 | return self.to_str() 198 | 199 | def __eq__(self, other): 200 | """Returns true if both objects are equal""" 201 | if not isinstance(other, Constraint): 202 | return False 203 | 204 | return self.__dict__ == other.__dict__ 205 | 206 | def __ne__(self, other): 207 | """Returns true if both objects are not equal""" 208 | return not self == other 209 | -------------------------------------------------------------------------------- /flagr/models/create_constraint_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class CreateConstraintRequest(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | '_property': 'str', 35 | 'operator': 'str', 36 | 'value': 'str' 37 | } 38 | 39 | attribute_map = { 40 | '_property': 'property', 41 | 'operator': 'operator', 42 | 'value': 'value' 43 | } 44 | 45 | def __init__(self, _property=None, operator=None, value=None): # noqa: E501 46 | """CreateConstraintRequest - a model defined in Swagger""" # noqa: E501 47 | 48 | self.__property = None 49 | self._operator = None 50 | self._value = None 51 | self.discriminator = None 52 | 53 | self._property = _property 54 | self.operator = operator 55 | self.value = value 56 | 57 | @property 58 | def _property(self): 59 | """Gets the _property of this CreateConstraintRequest. # noqa: E501 60 | 61 | 62 | :return: The _property of this CreateConstraintRequest. # noqa: E501 63 | :rtype: str 64 | """ 65 | return self.__property 66 | 67 | @_property.setter 68 | def _property(self, _property): 69 | """Sets the _property of this CreateConstraintRequest. 70 | 71 | 72 | :param _property: The _property of this CreateConstraintRequest. # noqa: E501 73 | :type: str 74 | """ 75 | if _property is None: 76 | raise ValueError("Invalid value for `_property`, must not be `None`") # noqa: E501 77 | if _property is not None and len(_property) < 1: 78 | raise ValueError("Invalid value for `_property`, length must be greater than or equal to `1`") # noqa: E501 79 | 80 | self.__property = _property 81 | 82 | @property 83 | def operator(self): 84 | """Gets the operator of this CreateConstraintRequest. # noqa: E501 85 | 86 | 87 | :return: The operator of this CreateConstraintRequest. # noqa: E501 88 | :rtype: str 89 | """ 90 | return self._operator 91 | 92 | @operator.setter 93 | def operator(self, operator): 94 | """Sets the operator of this CreateConstraintRequest. 95 | 96 | 97 | :param operator: The operator of this CreateConstraintRequest. # noqa: E501 98 | :type: str 99 | """ 100 | if operator is None: 101 | raise ValueError("Invalid value for `operator`, must not be `None`") # noqa: E501 102 | if operator is not None and len(operator) < 1: 103 | raise ValueError("Invalid value for `operator`, length must be greater than or equal to `1`") # noqa: E501 104 | 105 | self._operator = operator 106 | 107 | @property 108 | def value(self): 109 | """Gets the value of this CreateConstraintRequest. # noqa: E501 110 | 111 | 112 | :return: The value of this CreateConstraintRequest. # noqa: E501 113 | :rtype: str 114 | """ 115 | return self._value 116 | 117 | @value.setter 118 | def value(self, value): 119 | """Sets the value of this CreateConstraintRequest. 120 | 121 | 122 | :param value: The value of this CreateConstraintRequest. # noqa: E501 123 | :type: str 124 | """ 125 | if value is None: 126 | raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 127 | if value is not None and len(value) < 1: 128 | raise ValueError("Invalid value for `value`, length must be greater than or equal to `1`") # noqa: E501 129 | 130 | self._value = value 131 | 132 | def to_dict(self): 133 | """Returns the model properties as a dict""" 134 | result = {} 135 | 136 | for attr, _ in six.iteritems(self.swagger_types): 137 | value = getattr(self, attr) 138 | if isinstance(value, list): 139 | result[attr] = list(map( 140 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 141 | value 142 | )) 143 | elif hasattr(value, "to_dict"): 144 | result[attr] = value.to_dict() 145 | elif isinstance(value, dict): 146 | result[attr] = dict(map( 147 | lambda item: (item[0], item[1].to_dict()) 148 | if hasattr(item[1], "to_dict") else item, 149 | value.items() 150 | )) 151 | else: 152 | result[attr] = value 153 | if issubclass(CreateConstraintRequest, dict): 154 | for key, value in self.items(): 155 | result[key] = value 156 | 157 | return result 158 | 159 | def to_str(self): 160 | """Returns the string representation of the model""" 161 | return pprint.pformat(self.to_dict()) 162 | 163 | def __repr__(self): 164 | """For `print` and `pprint`""" 165 | return self.to_str() 166 | 167 | def __eq__(self, other): 168 | """Returns true if both objects are equal""" 169 | if not isinstance(other, CreateConstraintRequest): 170 | return False 171 | 172 | return self.__dict__ == other.__dict__ 173 | 174 | def __ne__(self, other): 175 | """Returns true if both objects are not equal""" 176 | return not self == other 177 | -------------------------------------------------------------------------------- /flagr/models/create_flag_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class CreateFlagRequest(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'description': 'str', 35 | 'key': 'str', 36 | 'template': 'str' 37 | } 38 | 39 | attribute_map = { 40 | 'description': 'description', 41 | 'key': 'key', 42 | 'template': 'template' 43 | } 44 | 45 | def __init__(self, description=None, key=None, template=None): # noqa: E501 46 | """CreateFlagRequest - a model defined in Swagger""" # noqa: E501 47 | 48 | self._description = None 49 | self._key = None 50 | self._template = None 51 | self.discriminator = None 52 | 53 | self.description = description 54 | if key is not None: 55 | self.key = key 56 | if template is not None: 57 | self.template = template 58 | 59 | @property 60 | def description(self): 61 | """Gets the description of this CreateFlagRequest. # noqa: E501 62 | 63 | 64 | :return: The description of this CreateFlagRequest. # noqa: E501 65 | :rtype: str 66 | """ 67 | return self._description 68 | 69 | @description.setter 70 | def description(self, description): 71 | """Sets the description of this CreateFlagRequest. 72 | 73 | 74 | :param description: The description of this CreateFlagRequest. # noqa: E501 75 | :type: str 76 | """ 77 | if description is None: 78 | raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 79 | if description is not None and len(description) < 1: 80 | raise ValueError("Invalid value for `description`, length must be greater than or equal to `1`") # noqa: E501 81 | 82 | self._description = description 83 | 84 | @property 85 | def key(self): 86 | """Gets the key of this CreateFlagRequest. # noqa: E501 87 | 88 | unique key representation of the flag # noqa: E501 89 | 90 | :return: The key of this CreateFlagRequest. # noqa: E501 91 | :rtype: str 92 | """ 93 | return self._key 94 | 95 | @key.setter 96 | def key(self, key): 97 | """Sets the key of this CreateFlagRequest. 98 | 99 | unique key representation of the flag # noqa: E501 100 | 101 | :param key: The key of this CreateFlagRequest. # noqa: E501 102 | :type: str 103 | """ 104 | 105 | self._key = key 106 | 107 | @property 108 | def template(self): 109 | """Gets the template of this CreateFlagRequest. # noqa: E501 110 | 111 | template for flag creation # noqa: E501 112 | 113 | :return: The template of this CreateFlagRequest. # noqa: E501 114 | :rtype: str 115 | """ 116 | return self._template 117 | 118 | @template.setter 119 | def template(self, template): 120 | """Sets the template of this CreateFlagRequest. 121 | 122 | template for flag creation # noqa: E501 123 | 124 | :param template: The template of this CreateFlagRequest. # noqa: E501 125 | :type: str 126 | """ 127 | 128 | self._template = template 129 | 130 | def to_dict(self): 131 | """Returns the model properties as a dict""" 132 | result = {} 133 | 134 | for attr, _ in six.iteritems(self.swagger_types): 135 | value = getattr(self, attr) 136 | if isinstance(value, list): 137 | result[attr] = list(map( 138 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 139 | value 140 | )) 141 | elif hasattr(value, "to_dict"): 142 | result[attr] = value.to_dict() 143 | elif isinstance(value, dict): 144 | result[attr] = dict(map( 145 | lambda item: (item[0], item[1].to_dict()) 146 | if hasattr(item[1], "to_dict") else item, 147 | value.items() 148 | )) 149 | else: 150 | result[attr] = value 151 | if issubclass(CreateFlagRequest, dict): 152 | for key, value in self.items(): 153 | result[key] = value 154 | 155 | return result 156 | 157 | def to_str(self): 158 | """Returns the string representation of the model""" 159 | return pprint.pformat(self.to_dict()) 160 | 161 | def __repr__(self): 162 | """For `print` and `pprint`""" 163 | return self.to_str() 164 | 165 | def __eq__(self, other): 166 | """Returns true if both objects are equal""" 167 | if not isinstance(other, CreateFlagRequest): 168 | return False 169 | 170 | return self.__dict__ == other.__dict__ 171 | 172 | def __ne__(self, other): 173 | """Returns true if both objects are not equal""" 174 | return not self == other 175 | -------------------------------------------------------------------------------- /flagr/models/create_segment_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class CreateSegmentRequest(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'description': 'str', 35 | 'rollout_percent': 'int' 36 | } 37 | 38 | attribute_map = { 39 | 'description': 'description', 40 | 'rollout_percent': 'rolloutPercent' 41 | } 42 | 43 | def __init__(self, description=None, rollout_percent=None): # noqa: E501 44 | """CreateSegmentRequest - a model defined in Swagger""" # noqa: E501 45 | 46 | self._description = None 47 | self._rollout_percent = None 48 | self.discriminator = None 49 | 50 | self.description = description 51 | self.rollout_percent = rollout_percent 52 | 53 | @property 54 | def description(self): 55 | """Gets the description of this CreateSegmentRequest. # noqa: E501 56 | 57 | 58 | :return: The description of this CreateSegmentRequest. # noqa: E501 59 | :rtype: str 60 | """ 61 | return self._description 62 | 63 | @description.setter 64 | def description(self, description): 65 | """Sets the description of this CreateSegmentRequest. 66 | 67 | 68 | :param description: The description of this CreateSegmentRequest. # noqa: E501 69 | :type: str 70 | """ 71 | if description is None: 72 | raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 73 | if description is not None and len(description) < 1: 74 | raise ValueError("Invalid value for `description`, length must be greater than or equal to `1`") # noqa: E501 75 | 76 | self._description = description 77 | 78 | @property 79 | def rollout_percent(self): 80 | """Gets the rollout_percent of this CreateSegmentRequest. # noqa: E501 81 | 82 | 83 | :return: The rollout_percent of this CreateSegmentRequest. # noqa: E501 84 | :rtype: int 85 | """ 86 | return self._rollout_percent 87 | 88 | @rollout_percent.setter 89 | def rollout_percent(self, rollout_percent): 90 | """Sets the rollout_percent of this CreateSegmentRequest. 91 | 92 | 93 | :param rollout_percent: The rollout_percent of this CreateSegmentRequest. # noqa: E501 94 | :type: int 95 | """ 96 | if rollout_percent is None: 97 | raise ValueError("Invalid value for `rollout_percent`, must not be `None`") # noqa: E501 98 | if rollout_percent is not None and rollout_percent > 100: # noqa: E501 99 | raise ValueError("Invalid value for `rollout_percent`, must be a value less than or equal to `100`") # noqa: E501 100 | if rollout_percent is not None and rollout_percent < 0: # noqa: E501 101 | raise ValueError("Invalid value for `rollout_percent`, must be a value greater than or equal to `0`") # noqa: E501 102 | 103 | self._rollout_percent = rollout_percent 104 | 105 | def to_dict(self): 106 | """Returns the model properties as a dict""" 107 | result = {} 108 | 109 | for attr, _ in six.iteritems(self.swagger_types): 110 | value = getattr(self, attr) 111 | if isinstance(value, list): 112 | result[attr] = list(map( 113 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 114 | value 115 | )) 116 | elif hasattr(value, "to_dict"): 117 | result[attr] = value.to_dict() 118 | elif isinstance(value, dict): 119 | result[attr] = dict(map( 120 | lambda item: (item[0], item[1].to_dict()) 121 | if hasattr(item[1], "to_dict") else item, 122 | value.items() 123 | )) 124 | else: 125 | result[attr] = value 126 | if issubclass(CreateSegmentRequest, dict): 127 | for key, value in self.items(): 128 | result[key] = value 129 | 130 | return result 131 | 132 | def to_str(self): 133 | """Returns the string representation of the model""" 134 | return pprint.pformat(self.to_dict()) 135 | 136 | def __repr__(self): 137 | """For `print` and `pprint`""" 138 | return self.to_str() 139 | 140 | def __eq__(self, other): 141 | """Returns true if both objects are equal""" 142 | if not isinstance(other, CreateSegmentRequest): 143 | return False 144 | 145 | return self.__dict__ == other.__dict__ 146 | 147 | def __ne__(self, other): 148 | """Returns true if both objects are not equal""" 149 | return not self == other 150 | -------------------------------------------------------------------------------- /flagr/models/create_tag_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class CreateTagRequest(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'value': 'str' 35 | } 36 | 37 | attribute_map = { 38 | 'value': 'value' 39 | } 40 | 41 | def __init__(self, value=None): # noqa: E501 42 | """CreateTagRequest - a model defined in Swagger""" # noqa: E501 43 | 44 | self._value = None 45 | self.discriminator = None 46 | 47 | self.value = value 48 | 49 | @property 50 | def value(self): 51 | """Gets the value of this CreateTagRequest. # noqa: E501 52 | 53 | 54 | :return: The value of this CreateTagRequest. # noqa: E501 55 | :rtype: str 56 | """ 57 | return self._value 58 | 59 | @value.setter 60 | def value(self, value): 61 | """Sets the value of this CreateTagRequest. 62 | 63 | 64 | :param value: The value of this CreateTagRequest. # noqa: E501 65 | :type: str 66 | """ 67 | if value is None: 68 | raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 69 | if value is not None and len(value) < 1: 70 | raise ValueError("Invalid value for `value`, length must be greater than or equal to `1`") # noqa: E501 71 | 72 | self._value = value 73 | 74 | def to_dict(self): 75 | """Returns the model properties as a dict""" 76 | result = {} 77 | 78 | for attr, _ in six.iteritems(self.swagger_types): 79 | value = getattr(self, attr) 80 | if isinstance(value, list): 81 | result[attr] = list(map( 82 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 83 | value 84 | )) 85 | elif hasattr(value, "to_dict"): 86 | result[attr] = value.to_dict() 87 | elif isinstance(value, dict): 88 | result[attr] = dict(map( 89 | lambda item: (item[0], item[1].to_dict()) 90 | if hasattr(item[1], "to_dict") else item, 91 | value.items() 92 | )) 93 | else: 94 | result[attr] = value 95 | if issubclass(CreateTagRequest, dict): 96 | for key, value in self.items(): 97 | result[key] = value 98 | 99 | return result 100 | 101 | def to_str(self): 102 | """Returns the string representation of the model""" 103 | return pprint.pformat(self.to_dict()) 104 | 105 | def __repr__(self): 106 | """For `print` and `pprint`""" 107 | return self.to_str() 108 | 109 | def __eq__(self, other): 110 | """Returns true if both objects are equal""" 111 | if not isinstance(other, CreateTagRequest): 112 | return False 113 | 114 | return self.__dict__ == other.__dict__ 115 | 116 | def __ne__(self, other): 117 | """Returns true if both objects are not equal""" 118 | return not self == other 119 | -------------------------------------------------------------------------------- /flagr/models/create_variant_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class CreateVariantRequest(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'key': 'str', 35 | 'attachment': 'object' 36 | } 37 | 38 | attribute_map = { 39 | 'key': 'key', 40 | 'attachment': 'attachment' 41 | } 42 | 43 | def __init__(self, key=None, attachment=None): # noqa: E501 44 | """CreateVariantRequest - a model defined in Swagger""" # noqa: E501 45 | 46 | self._key = None 47 | self._attachment = None 48 | self.discriminator = None 49 | 50 | self.key = key 51 | if attachment is not None: 52 | self.attachment = attachment 53 | 54 | @property 55 | def key(self): 56 | """Gets the key of this CreateVariantRequest. # noqa: E501 57 | 58 | 59 | :return: The key of this CreateVariantRequest. # noqa: E501 60 | :rtype: str 61 | """ 62 | return self._key 63 | 64 | @key.setter 65 | def key(self, key): 66 | """Sets the key of this CreateVariantRequest. 67 | 68 | 69 | :param key: The key of this CreateVariantRequest. # noqa: E501 70 | :type: str 71 | """ 72 | if key is None: 73 | raise ValueError("Invalid value for `key`, must not be `None`") # noqa: E501 74 | if key is not None and len(key) < 1: 75 | raise ValueError("Invalid value for `key`, length must be greater than or equal to `1`") # noqa: E501 76 | 77 | self._key = key 78 | 79 | @property 80 | def attachment(self): 81 | """Gets the attachment of this CreateVariantRequest. # noqa: E501 82 | 83 | 84 | :return: The attachment of this CreateVariantRequest. # noqa: E501 85 | :rtype: object 86 | """ 87 | return self._attachment 88 | 89 | @attachment.setter 90 | def attachment(self, attachment): 91 | """Sets the attachment of this CreateVariantRequest. 92 | 93 | 94 | :param attachment: The attachment of this CreateVariantRequest. # noqa: E501 95 | :type: object 96 | """ 97 | 98 | self._attachment = attachment 99 | 100 | def to_dict(self): 101 | """Returns the model properties as a dict""" 102 | result = {} 103 | 104 | for attr, _ in six.iteritems(self.swagger_types): 105 | value = getattr(self, attr) 106 | if isinstance(value, list): 107 | result[attr] = list(map( 108 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 109 | value 110 | )) 111 | elif hasattr(value, "to_dict"): 112 | result[attr] = value.to_dict() 113 | elif isinstance(value, dict): 114 | result[attr] = dict(map( 115 | lambda item: (item[0], item[1].to_dict()) 116 | if hasattr(item[1], "to_dict") else item, 117 | value.items() 118 | )) 119 | else: 120 | result[attr] = value 121 | if issubclass(CreateVariantRequest, dict): 122 | for key, value in self.items(): 123 | result[key] = value 124 | 125 | return result 126 | 127 | def to_str(self): 128 | """Returns the string representation of the model""" 129 | return pprint.pformat(self.to_dict()) 130 | 131 | def __repr__(self): 132 | """For `print` and `pprint`""" 133 | return self.to_str() 134 | 135 | def __eq__(self, other): 136 | """Returns true if both objects are equal""" 137 | if not isinstance(other, CreateVariantRequest): 138 | return False 139 | 140 | return self.__dict__ == other.__dict__ 141 | 142 | def __ne__(self, other): 143 | """Returns true if both objects are not equal""" 144 | return not self == other 145 | -------------------------------------------------------------------------------- /flagr/models/distribution.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class Distribution(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'id': 'int', 35 | 'percent': 'int', 36 | 'variant_key': 'str', 37 | 'variant_id': 'int' 38 | } 39 | 40 | attribute_map = { 41 | 'id': 'id', 42 | 'percent': 'percent', 43 | 'variant_key': 'variantKey', 44 | 'variant_id': 'variantID' 45 | } 46 | 47 | def __init__(self, id=None, percent=None, variant_key=None, variant_id=None): # noqa: E501 48 | """Distribution - a model defined in Swagger""" # noqa: E501 49 | 50 | self._id = None 51 | self._percent = None 52 | self._variant_key = None 53 | self._variant_id = None 54 | self.discriminator = None 55 | 56 | if id is not None: 57 | self.id = id 58 | self.percent = percent 59 | self.variant_key = variant_key 60 | self.variant_id = variant_id 61 | 62 | @property 63 | def id(self): 64 | """Gets the id of this Distribution. # noqa: E501 65 | 66 | 67 | :return: The id of this Distribution. # noqa: E501 68 | :rtype: int 69 | """ 70 | return self._id 71 | 72 | @id.setter 73 | def id(self, id): 74 | """Sets the id of this Distribution. 75 | 76 | 77 | :param id: The id of this Distribution. # noqa: E501 78 | :type: int 79 | """ 80 | if id is not None and id < 1: # noqa: E501 81 | raise ValueError("Invalid value for `id`, must be a value greater than or equal to `1`") # noqa: E501 82 | 83 | self._id = id 84 | 85 | @property 86 | def percent(self): 87 | """Gets the percent of this Distribution. # noqa: E501 88 | 89 | 90 | :return: The percent of this Distribution. # noqa: E501 91 | :rtype: int 92 | """ 93 | return self._percent 94 | 95 | @percent.setter 96 | def percent(self, percent): 97 | """Sets the percent of this Distribution. 98 | 99 | 100 | :param percent: The percent of this Distribution. # noqa: E501 101 | :type: int 102 | """ 103 | if percent is None: 104 | raise ValueError("Invalid value for `percent`, must not be `None`") # noqa: E501 105 | if percent is not None and percent > 100: # noqa: E501 106 | raise ValueError("Invalid value for `percent`, must be a value less than or equal to `100`") # noqa: E501 107 | if percent is not None and percent < 0: # noqa: E501 108 | raise ValueError("Invalid value for `percent`, must be a value greater than or equal to `0`") # noqa: E501 109 | 110 | self._percent = percent 111 | 112 | @property 113 | def variant_key(self): 114 | """Gets the variant_key of this Distribution. # noqa: E501 115 | 116 | 117 | :return: The variant_key of this Distribution. # noqa: E501 118 | :rtype: str 119 | """ 120 | return self._variant_key 121 | 122 | @variant_key.setter 123 | def variant_key(self, variant_key): 124 | """Sets the variant_key of this Distribution. 125 | 126 | 127 | :param variant_key: The variant_key of this Distribution. # noqa: E501 128 | :type: str 129 | """ 130 | if variant_key is None: 131 | raise ValueError("Invalid value for `variant_key`, must not be `None`") # noqa: E501 132 | if variant_key is not None and len(variant_key) < 1: 133 | raise ValueError("Invalid value for `variant_key`, length must be greater than or equal to `1`") # noqa: E501 134 | 135 | self._variant_key = variant_key 136 | 137 | @property 138 | def variant_id(self): 139 | """Gets the variant_id of this Distribution. # noqa: E501 140 | 141 | 142 | :return: The variant_id of this Distribution. # noqa: E501 143 | :rtype: int 144 | """ 145 | return self._variant_id 146 | 147 | @variant_id.setter 148 | def variant_id(self, variant_id): 149 | """Sets the variant_id of this Distribution. 150 | 151 | 152 | :param variant_id: The variant_id of this Distribution. # noqa: E501 153 | :type: int 154 | """ 155 | if variant_id is None: 156 | raise ValueError("Invalid value for `variant_id`, must not be `None`") # noqa: E501 157 | if variant_id is not None and variant_id < 1: # noqa: E501 158 | raise ValueError("Invalid value for `variant_id`, must be a value greater than or equal to `1`") # noqa: E501 159 | 160 | self._variant_id = variant_id 161 | 162 | def to_dict(self): 163 | """Returns the model properties as a dict""" 164 | result = {} 165 | 166 | for attr, _ in six.iteritems(self.swagger_types): 167 | value = getattr(self, attr) 168 | if isinstance(value, list): 169 | result[attr] = list(map( 170 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 171 | value 172 | )) 173 | elif hasattr(value, "to_dict"): 174 | result[attr] = value.to_dict() 175 | elif isinstance(value, dict): 176 | result[attr] = dict(map( 177 | lambda item: (item[0], item[1].to_dict()) 178 | if hasattr(item[1], "to_dict") else item, 179 | value.items() 180 | )) 181 | else: 182 | result[attr] = value 183 | if issubclass(Distribution, dict): 184 | for key, value in self.items(): 185 | result[key] = value 186 | 187 | return result 188 | 189 | def to_str(self): 190 | """Returns the string representation of the model""" 191 | return pprint.pformat(self.to_dict()) 192 | 193 | def __repr__(self): 194 | """For `print` and `pprint`""" 195 | return self.to_str() 196 | 197 | def __eq__(self, other): 198 | """Returns true if both objects are equal""" 199 | if not isinstance(other, Distribution): 200 | return False 201 | 202 | return self.__dict__ == other.__dict__ 203 | 204 | def __ne__(self, other): 205 | """Returns true if both objects are not equal""" 206 | return not self == other 207 | -------------------------------------------------------------------------------- /flagr/models/error.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class Error(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'message': 'str' 35 | } 36 | 37 | attribute_map = { 38 | 'message': 'message' 39 | } 40 | 41 | def __init__(self, message=None): # noqa: E501 42 | """Error - a model defined in Swagger""" # noqa: E501 43 | 44 | self._message = None 45 | self.discriminator = None 46 | 47 | self.message = message 48 | 49 | @property 50 | def message(self): 51 | """Gets the message of this Error. # noqa: E501 52 | 53 | 54 | :return: The message of this Error. # noqa: E501 55 | :rtype: str 56 | """ 57 | return self._message 58 | 59 | @message.setter 60 | def message(self, message): 61 | """Sets the message of this Error. 62 | 63 | 64 | :param message: The message of this Error. # noqa: E501 65 | :type: str 66 | """ 67 | if message is None: 68 | raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 69 | if message is not None and len(message) < 1: 70 | raise ValueError("Invalid value for `message`, length must be greater than or equal to `1`") # noqa: E501 71 | 72 | self._message = message 73 | 74 | def to_dict(self): 75 | """Returns the model properties as a dict""" 76 | result = {} 77 | 78 | for attr, _ in six.iteritems(self.swagger_types): 79 | value = getattr(self, attr) 80 | if isinstance(value, list): 81 | result[attr] = list(map( 82 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 83 | value 84 | )) 85 | elif hasattr(value, "to_dict"): 86 | result[attr] = value.to_dict() 87 | elif isinstance(value, dict): 88 | result[attr] = dict(map( 89 | lambda item: (item[0], item[1].to_dict()) 90 | if hasattr(item[1], "to_dict") else item, 91 | value.items() 92 | )) 93 | else: 94 | result[attr] = value 95 | if issubclass(Error, dict): 96 | for key, value in self.items(): 97 | result[key] = value 98 | 99 | return result 100 | 101 | def to_str(self): 102 | """Returns the string representation of the model""" 103 | return pprint.pformat(self.to_dict()) 104 | 105 | def __repr__(self): 106 | """For `print` and `pprint`""" 107 | return self.to_str() 108 | 109 | def __eq__(self, other): 110 | """Returns true if both objects are equal""" 111 | if not isinstance(other, Error): 112 | return False 113 | 114 | return self.__dict__ == other.__dict__ 115 | 116 | def __ne__(self, other): 117 | """Returns true if both objects are not equal""" 118 | return not self == other 119 | -------------------------------------------------------------------------------- /flagr/models/eval_debug_log.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class EvalDebugLog(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'segment_debug_logs': 'list[SegmentDebugLog]', 35 | 'msg': 'str' 36 | } 37 | 38 | attribute_map = { 39 | 'segment_debug_logs': 'segmentDebugLogs', 40 | 'msg': 'msg' 41 | } 42 | 43 | def __init__(self, segment_debug_logs=None, msg=None): # noqa: E501 44 | """EvalDebugLog - a model defined in Swagger""" # noqa: E501 45 | 46 | self._segment_debug_logs = None 47 | self._msg = None 48 | self.discriminator = None 49 | 50 | if segment_debug_logs is not None: 51 | self.segment_debug_logs = segment_debug_logs 52 | if msg is not None: 53 | self.msg = msg 54 | 55 | @property 56 | def segment_debug_logs(self): 57 | """Gets the segment_debug_logs of this EvalDebugLog. # noqa: E501 58 | 59 | 60 | :return: The segment_debug_logs of this EvalDebugLog. # noqa: E501 61 | :rtype: list[SegmentDebugLog] 62 | """ 63 | return self._segment_debug_logs 64 | 65 | @segment_debug_logs.setter 66 | def segment_debug_logs(self, segment_debug_logs): 67 | """Sets the segment_debug_logs of this EvalDebugLog. 68 | 69 | 70 | :param segment_debug_logs: The segment_debug_logs of this EvalDebugLog. # noqa: E501 71 | :type: list[SegmentDebugLog] 72 | """ 73 | 74 | self._segment_debug_logs = segment_debug_logs 75 | 76 | @property 77 | def msg(self): 78 | """Gets the msg of this EvalDebugLog. # noqa: E501 79 | 80 | 81 | :return: The msg of this EvalDebugLog. # noqa: E501 82 | :rtype: str 83 | """ 84 | return self._msg 85 | 86 | @msg.setter 87 | def msg(self, msg): 88 | """Sets the msg of this EvalDebugLog. 89 | 90 | 91 | :param msg: The msg of this EvalDebugLog. # noqa: E501 92 | :type: str 93 | """ 94 | 95 | self._msg = msg 96 | 97 | def to_dict(self): 98 | """Returns the model properties as a dict""" 99 | result = {} 100 | 101 | for attr, _ in six.iteritems(self.swagger_types): 102 | value = getattr(self, attr) 103 | if isinstance(value, list): 104 | result[attr] = list(map( 105 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 106 | value 107 | )) 108 | elif hasattr(value, "to_dict"): 109 | result[attr] = value.to_dict() 110 | elif isinstance(value, dict): 111 | result[attr] = dict(map( 112 | lambda item: (item[0], item[1].to_dict()) 113 | if hasattr(item[1], "to_dict") else item, 114 | value.items() 115 | )) 116 | else: 117 | result[attr] = value 118 | if issubclass(EvalDebugLog, dict): 119 | for key, value in self.items(): 120 | result[key] = value 121 | 122 | return result 123 | 124 | def to_str(self): 125 | """Returns the string representation of the model""" 126 | return pprint.pformat(self.to_dict()) 127 | 128 | def __repr__(self): 129 | """For `print` and `pprint`""" 130 | return self.to_str() 131 | 132 | def __eq__(self, other): 133 | """Returns true if both objects are equal""" 134 | if not isinstance(other, EvalDebugLog): 135 | return False 136 | 137 | return self.__dict__ == other.__dict__ 138 | 139 | def __ne__(self, other): 140 | """Returns true if both objects are not equal""" 141 | return not self == other 142 | -------------------------------------------------------------------------------- /flagr/models/evaluation_batch_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class EvaluationBatchResponse(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'evaluation_results': 'list[EvalResult]' 35 | } 36 | 37 | attribute_map = { 38 | 'evaluation_results': 'evaluationResults' 39 | } 40 | 41 | def __init__(self, evaluation_results=None): # noqa: E501 42 | """EvaluationBatchResponse - a model defined in Swagger""" # noqa: E501 43 | 44 | self._evaluation_results = None 45 | self.discriminator = None 46 | 47 | self.evaluation_results = evaluation_results 48 | 49 | @property 50 | def evaluation_results(self): 51 | """Gets the evaluation_results of this EvaluationBatchResponse. # noqa: E501 52 | 53 | 54 | :return: The evaluation_results of this EvaluationBatchResponse. # noqa: E501 55 | :rtype: list[EvalResult] 56 | """ 57 | return self._evaluation_results 58 | 59 | @evaluation_results.setter 60 | def evaluation_results(self, evaluation_results): 61 | """Sets the evaluation_results of this EvaluationBatchResponse. 62 | 63 | 64 | :param evaluation_results: The evaluation_results of this EvaluationBatchResponse. # noqa: E501 65 | :type: list[EvalResult] 66 | """ 67 | if evaluation_results is None: 68 | raise ValueError("Invalid value for `evaluation_results`, must not be `None`") # noqa: E501 69 | 70 | self._evaluation_results = evaluation_results 71 | 72 | def to_dict(self): 73 | """Returns the model properties as a dict""" 74 | result = {} 75 | 76 | for attr, _ in six.iteritems(self.swagger_types): 77 | value = getattr(self, attr) 78 | if isinstance(value, list): 79 | result[attr] = list(map( 80 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 81 | value 82 | )) 83 | elif hasattr(value, "to_dict"): 84 | result[attr] = value.to_dict() 85 | elif isinstance(value, dict): 86 | result[attr] = dict(map( 87 | lambda item: (item[0], item[1].to_dict()) 88 | if hasattr(item[1], "to_dict") else item, 89 | value.items() 90 | )) 91 | else: 92 | result[attr] = value 93 | if issubclass(EvaluationBatchResponse, dict): 94 | for key, value in self.items(): 95 | result[key] = value 96 | 97 | return result 98 | 99 | def to_str(self): 100 | """Returns the string representation of the model""" 101 | return pprint.pformat(self.to_dict()) 102 | 103 | def __repr__(self): 104 | """For `print` and `pprint`""" 105 | return self.to_str() 106 | 107 | def __eq__(self, other): 108 | """Returns true if both objects are equal""" 109 | if not isinstance(other, EvaluationBatchResponse): 110 | return False 111 | 112 | return self.__dict__ == other.__dict__ 113 | 114 | def __ne__(self, other): 115 | """Returns true if both objects are not equal""" 116 | return not self == other 117 | -------------------------------------------------------------------------------- /flagr/models/evaluation_entity.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class EvaluationEntity(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'entity_id': 'str', 35 | 'entity_type': 'str', 36 | 'entity_context': 'object' 37 | } 38 | 39 | attribute_map = { 40 | 'entity_id': 'entityID', 41 | 'entity_type': 'entityType', 42 | 'entity_context': 'entityContext' 43 | } 44 | 45 | def __init__(self, entity_id=None, entity_type=None, entity_context=None): # noqa: E501 46 | """EvaluationEntity - a model defined in Swagger""" # noqa: E501 47 | 48 | self._entity_id = None 49 | self._entity_type = None 50 | self._entity_context = None 51 | self.discriminator = None 52 | 53 | if entity_id is not None: 54 | self.entity_id = entity_id 55 | if entity_type is not None: 56 | self.entity_type = entity_type 57 | if entity_context is not None: 58 | self.entity_context = entity_context 59 | 60 | @property 61 | def entity_id(self): 62 | """Gets the entity_id of this EvaluationEntity. # noqa: E501 63 | 64 | 65 | :return: The entity_id of this EvaluationEntity. # noqa: E501 66 | :rtype: str 67 | """ 68 | return self._entity_id 69 | 70 | @entity_id.setter 71 | def entity_id(self, entity_id): 72 | """Sets the entity_id of this EvaluationEntity. 73 | 74 | 75 | :param entity_id: The entity_id of this EvaluationEntity. # noqa: E501 76 | :type: str 77 | """ 78 | 79 | self._entity_id = entity_id 80 | 81 | @property 82 | def entity_type(self): 83 | """Gets the entity_type of this EvaluationEntity. # noqa: E501 84 | 85 | 86 | :return: The entity_type of this EvaluationEntity. # noqa: E501 87 | :rtype: str 88 | """ 89 | return self._entity_type 90 | 91 | @entity_type.setter 92 | def entity_type(self, entity_type): 93 | """Sets the entity_type of this EvaluationEntity. 94 | 95 | 96 | :param entity_type: The entity_type of this EvaluationEntity. # noqa: E501 97 | :type: str 98 | """ 99 | 100 | self._entity_type = entity_type 101 | 102 | @property 103 | def entity_context(self): 104 | """Gets the entity_context of this EvaluationEntity. # noqa: E501 105 | 106 | 107 | :return: The entity_context of this EvaluationEntity. # noqa: E501 108 | :rtype: object 109 | """ 110 | return self._entity_context 111 | 112 | @entity_context.setter 113 | def entity_context(self, entity_context): 114 | """Sets the entity_context of this EvaluationEntity. 115 | 116 | 117 | :param entity_context: The entity_context of this EvaluationEntity. # noqa: E501 118 | :type: object 119 | """ 120 | 121 | self._entity_context = entity_context 122 | 123 | def to_dict(self): 124 | """Returns the model properties as a dict""" 125 | result = {} 126 | 127 | for attr, _ in six.iteritems(self.swagger_types): 128 | value = getattr(self, attr) 129 | if isinstance(value, list): 130 | result[attr] = list(map( 131 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 132 | value 133 | )) 134 | elif hasattr(value, "to_dict"): 135 | result[attr] = value.to_dict() 136 | elif isinstance(value, dict): 137 | result[attr] = dict(map( 138 | lambda item: (item[0], item[1].to_dict()) 139 | if hasattr(item[1], "to_dict") else item, 140 | value.items() 141 | )) 142 | else: 143 | result[attr] = value 144 | if issubclass(EvaluationEntity, dict): 145 | for key, value in self.items(): 146 | result[key] = value 147 | 148 | return result 149 | 150 | def to_str(self): 151 | """Returns the string representation of the model""" 152 | return pprint.pformat(self.to_dict()) 153 | 154 | def __repr__(self): 155 | """For `print` and `pprint`""" 156 | return self.to_str() 157 | 158 | def __eq__(self, other): 159 | """Returns true if both objects are equal""" 160 | if not isinstance(other, EvaluationEntity): 161 | return False 162 | 163 | return self.__dict__ == other.__dict__ 164 | 165 | def __ne__(self, other): 166 | """Returns true if both objects are not equal""" 167 | return not self == other 168 | -------------------------------------------------------------------------------- /flagr/models/flag_snapshot.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class FlagSnapshot(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'id': 'int', 35 | 'updated_by': 'str', 36 | 'flag': 'Flag', 37 | 'updated_at': 'str' 38 | } 39 | 40 | attribute_map = { 41 | 'id': 'id', 42 | 'updated_by': 'updatedBy', 43 | 'flag': 'flag', 44 | 'updated_at': 'updatedAt' 45 | } 46 | 47 | def __init__(self, id=None, updated_by=None, flag=None, updated_at=None): # noqa: E501 48 | """FlagSnapshot - a model defined in Swagger""" # noqa: E501 49 | 50 | self._id = None 51 | self._updated_by = None 52 | self._flag = None 53 | self._updated_at = None 54 | self.discriminator = None 55 | 56 | self.id = id 57 | if updated_by is not None: 58 | self.updated_by = updated_by 59 | self.flag = flag 60 | self.updated_at = updated_at 61 | 62 | @property 63 | def id(self): 64 | """Gets the id of this FlagSnapshot. # noqa: E501 65 | 66 | 67 | :return: The id of this FlagSnapshot. # noqa: E501 68 | :rtype: int 69 | """ 70 | return self._id 71 | 72 | @id.setter 73 | def id(self, id): 74 | """Sets the id of this FlagSnapshot. 75 | 76 | 77 | :param id: The id of this FlagSnapshot. # noqa: E501 78 | :type: int 79 | """ 80 | if id is None: 81 | raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 82 | if id is not None and id < 1: # noqa: E501 83 | raise ValueError("Invalid value for `id`, must be a value greater than or equal to `1`") # noqa: E501 84 | 85 | self._id = id 86 | 87 | @property 88 | def updated_by(self): 89 | """Gets the updated_by of this FlagSnapshot. # noqa: E501 90 | 91 | 92 | :return: The updated_by of this FlagSnapshot. # noqa: E501 93 | :rtype: str 94 | """ 95 | return self._updated_by 96 | 97 | @updated_by.setter 98 | def updated_by(self, updated_by): 99 | """Sets the updated_by of this FlagSnapshot. 100 | 101 | 102 | :param updated_by: The updated_by of this FlagSnapshot. # noqa: E501 103 | :type: str 104 | """ 105 | 106 | self._updated_by = updated_by 107 | 108 | @property 109 | def flag(self): 110 | """Gets the flag of this FlagSnapshot. # noqa: E501 111 | 112 | 113 | :return: The flag of this FlagSnapshot. # noqa: E501 114 | :rtype: Flag 115 | """ 116 | return self._flag 117 | 118 | @flag.setter 119 | def flag(self, flag): 120 | """Sets the flag of this FlagSnapshot. 121 | 122 | 123 | :param flag: The flag of this FlagSnapshot. # noqa: E501 124 | :type: Flag 125 | """ 126 | if flag is None: 127 | raise ValueError("Invalid value for `flag`, must not be `None`") # noqa: E501 128 | 129 | self._flag = flag 130 | 131 | @property 132 | def updated_at(self): 133 | """Gets the updated_at of this FlagSnapshot. # noqa: E501 134 | 135 | 136 | :return: The updated_at of this FlagSnapshot. # noqa: E501 137 | :rtype: str 138 | """ 139 | return self._updated_at 140 | 141 | @updated_at.setter 142 | def updated_at(self, updated_at): 143 | """Sets the updated_at of this FlagSnapshot. 144 | 145 | 146 | :param updated_at: The updated_at of this FlagSnapshot. # noqa: E501 147 | :type: str 148 | """ 149 | if updated_at is None: 150 | raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 151 | if updated_at is not None and len(updated_at) < 1: 152 | raise ValueError("Invalid value for `updated_at`, length must be greater than or equal to `1`") # noqa: E501 153 | 154 | self._updated_at = updated_at 155 | 156 | def to_dict(self): 157 | """Returns the model properties as a dict""" 158 | result = {} 159 | 160 | for attr, _ in six.iteritems(self.swagger_types): 161 | value = getattr(self, attr) 162 | if isinstance(value, list): 163 | result[attr] = list(map( 164 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 165 | value 166 | )) 167 | elif hasattr(value, "to_dict"): 168 | result[attr] = value.to_dict() 169 | elif isinstance(value, dict): 170 | result[attr] = dict(map( 171 | lambda item: (item[0], item[1].to_dict()) 172 | if hasattr(item[1], "to_dict") else item, 173 | value.items() 174 | )) 175 | else: 176 | result[attr] = value 177 | if issubclass(FlagSnapshot, dict): 178 | for key, value in self.items(): 179 | result[key] = value 180 | 181 | return result 182 | 183 | def to_str(self): 184 | """Returns the string representation of the model""" 185 | return pprint.pformat(self.to_dict()) 186 | 187 | def __repr__(self): 188 | """For `print` and `pprint`""" 189 | return self.to_str() 190 | 191 | def __eq__(self, other): 192 | """Returns true if both objects are equal""" 193 | if not isinstance(other, FlagSnapshot): 194 | return False 195 | 196 | return self.__dict__ == other.__dict__ 197 | 198 | def __ne__(self, other): 199 | """Returns true if both objects are not equal""" 200 | return not self == other 201 | -------------------------------------------------------------------------------- /flagr/models/health.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class Health(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'status': 'str' 35 | } 36 | 37 | attribute_map = { 38 | 'status': 'status' 39 | } 40 | 41 | def __init__(self, status=None): # noqa: E501 42 | """Health - a model defined in Swagger""" # noqa: E501 43 | 44 | self._status = None 45 | self.discriminator = None 46 | 47 | if status is not None: 48 | self.status = status 49 | 50 | @property 51 | def status(self): 52 | """Gets the status of this Health. # noqa: E501 53 | 54 | 55 | :return: The status of this Health. # noqa: E501 56 | :rtype: str 57 | """ 58 | return self._status 59 | 60 | @status.setter 61 | def status(self, status): 62 | """Sets the status of this Health. 63 | 64 | 65 | :param status: The status of this Health. # noqa: E501 66 | :type: str 67 | """ 68 | 69 | self._status = status 70 | 71 | def to_dict(self): 72 | """Returns the model properties as a dict""" 73 | result = {} 74 | 75 | for attr, _ in six.iteritems(self.swagger_types): 76 | value = getattr(self, attr) 77 | if isinstance(value, list): 78 | result[attr] = list(map( 79 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 80 | value 81 | )) 82 | elif hasattr(value, "to_dict"): 83 | result[attr] = value.to_dict() 84 | elif isinstance(value, dict): 85 | result[attr] = dict(map( 86 | lambda item: (item[0], item[1].to_dict()) 87 | if hasattr(item[1], "to_dict") else item, 88 | value.items() 89 | )) 90 | else: 91 | result[attr] = value 92 | if issubclass(Health, dict): 93 | for key, value in self.items(): 94 | result[key] = value 95 | 96 | return result 97 | 98 | def to_str(self): 99 | """Returns the string representation of the model""" 100 | return pprint.pformat(self.to_dict()) 101 | 102 | def __repr__(self): 103 | """For `print` and `pprint`""" 104 | return self.to_str() 105 | 106 | def __eq__(self, other): 107 | """Returns true if both objects are equal""" 108 | if not isinstance(other, Health): 109 | return False 110 | 111 | return self.__dict__ == other.__dict__ 112 | 113 | def __ne__(self, other): 114 | """Returns true if both objects are not equal""" 115 | return not self == other 116 | -------------------------------------------------------------------------------- /flagr/models/put_distributions_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class PutDistributionsRequest(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'distributions': 'list[Distribution]' 35 | } 36 | 37 | attribute_map = { 38 | 'distributions': 'distributions' 39 | } 40 | 41 | def __init__(self, distributions=None): # noqa: E501 42 | """PutDistributionsRequest - a model defined in Swagger""" # noqa: E501 43 | 44 | self._distributions = None 45 | self.discriminator = None 46 | 47 | self.distributions = distributions 48 | 49 | @property 50 | def distributions(self): 51 | """Gets the distributions of this PutDistributionsRequest. # noqa: E501 52 | 53 | 54 | :return: The distributions of this PutDistributionsRequest. # noqa: E501 55 | :rtype: list[Distribution] 56 | """ 57 | return self._distributions 58 | 59 | @distributions.setter 60 | def distributions(self, distributions): 61 | """Sets the distributions of this PutDistributionsRequest. 62 | 63 | 64 | :param distributions: The distributions of this PutDistributionsRequest. # noqa: E501 65 | :type: list[Distribution] 66 | """ 67 | if distributions is None: 68 | raise ValueError("Invalid value for `distributions`, must not be `None`") # noqa: E501 69 | 70 | self._distributions = distributions 71 | 72 | def to_dict(self): 73 | """Returns the model properties as a dict""" 74 | result = {} 75 | 76 | for attr, _ in six.iteritems(self.swagger_types): 77 | value = getattr(self, attr) 78 | if isinstance(value, list): 79 | result[attr] = list(map( 80 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 81 | value 82 | )) 83 | elif hasattr(value, "to_dict"): 84 | result[attr] = value.to_dict() 85 | elif isinstance(value, dict): 86 | result[attr] = dict(map( 87 | lambda item: (item[0], item[1].to_dict()) 88 | if hasattr(item[1], "to_dict") else item, 89 | value.items() 90 | )) 91 | else: 92 | result[attr] = value 93 | if issubclass(PutDistributionsRequest, dict): 94 | for key, value in self.items(): 95 | result[key] = value 96 | 97 | return result 98 | 99 | def to_str(self): 100 | """Returns the string representation of the model""" 101 | return pprint.pformat(self.to_dict()) 102 | 103 | def __repr__(self): 104 | """For `print` and `pprint`""" 105 | return self.to_str() 106 | 107 | def __eq__(self, other): 108 | """Returns true if both objects are equal""" 109 | if not isinstance(other, PutDistributionsRequest): 110 | return False 111 | 112 | return self.__dict__ == other.__dict__ 113 | 114 | def __ne__(self, other): 115 | """Returns true if both objects are not equal""" 116 | return not self == other 117 | -------------------------------------------------------------------------------- /flagr/models/put_segment_reorder_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class PutSegmentReorderRequest(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'segment_i_ds': 'list[int]' 35 | } 36 | 37 | attribute_map = { 38 | 'segment_i_ds': 'segmentIDs' 39 | } 40 | 41 | def __init__(self, segment_i_ds=None): # noqa: E501 42 | """PutSegmentReorderRequest - a model defined in Swagger""" # noqa: E501 43 | 44 | self._segment_i_ds = None 45 | self.discriminator = None 46 | 47 | self.segment_i_ds = segment_i_ds 48 | 49 | @property 50 | def segment_i_ds(self): 51 | """Gets the segment_i_ds of this PutSegmentReorderRequest. # noqa: E501 52 | 53 | 54 | :return: The segment_i_ds of this PutSegmentReorderRequest. # noqa: E501 55 | :rtype: list[int] 56 | """ 57 | return self._segment_i_ds 58 | 59 | @segment_i_ds.setter 60 | def segment_i_ds(self, segment_i_ds): 61 | """Sets the segment_i_ds of this PutSegmentReorderRequest. 62 | 63 | 64 | :param segment_i_ds: The segment_i_ds of this PutSegmentReorderRequest. # noqa: E501 65 | :type: list[int] 66 | """ 67 | if segment_i_ds is None: 68 | raise ValueError("Invalid value for `segment_i_ds`, must not be `None`") # noqa: E501 69 | 70 | self._segment_i_ds = segment_i_ds 71 | 72 | def to_dict(self): 73 | """Returns the model properties as a dict""" 74 | result = {} 75 | 76 | for attr, _ in six.iteritems(self.swagger_types): 77 | value = getattr(self, attr) 78 | if isinstance(value, list): 79 | result[attr] = list(map( 80 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 81 | value 82 | )) 83 | elif hasattr(value, "to_dict"): 84 | result[attr] = value.to_dict() 85 | elif isinstance(value, dict): 86 | result[attr] = dict(map( 87 | lambda item: (item[0], item[1].to_dict()) 88 | if hasattr(item[1], "to_dict") else item, 89 | value.items() 90 | )) 91 | else: 92 | result[attr] = value 93 | if issubclass(PutSegmentReorderRequest, dict): 94 | for key, value in self.items(): 95 | result[key] = value 96 | 97 | return result 98 | 99 | def to_str(self): 100 | """Returns the string representation of the model""" 101 | return pprint.pformat(self.to_dict()) 102 | 103 | def __repr__(self): 104 | """For `print` and `pprint`""" 105 | return self.to_str() 106 | 107 | def __eq__(self, other): 108 | """Returns true if both objects are equal""" 109 | if not isinstance(other, PutSegmentReorderRequest): 110 | return False 111 | 112 | return self.__dict__ == other.__dict__ 113 | 114 | def __ne__(self, other): 115 | """Returns true if both objects are not equal""" 116 | return not self == other 117 | -------------------------------------------------------------------------------- /flagr/models/put_segment_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class PutSegmentRequest(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'description': 'str', 35 | 'rollout_percent': 'int' 36 | } 37 | 38 | attribute_map = { 39 | 'description': 'description', 40 | 'rollout_percent': 'rolloutPercent' 41 | } 42 | 43 | def __init__(self, description=None, rollout_percent=None): # noqa: E501 44 | """PutSegmentRequest - a model defined in Swagger""" # noqa: E501 45 | 46 | self._description = None 47 | self._rollout_percent = None 48 | self.discriminator = None 49 | 50 | self.description = description 51 | self.rollout_percent = rollout_percent 52 | 53 | @property 54 | def description(self): 55 | """Gets the description of this PutSegmentRequest. # noqa: E501 56 | 57 | 58 | :return: The description of this PutSegmentRequest. # noqa: E501 59 | :rtype: str 60 | """ 61 | return self._description 62 | 63 | @description.setter 64 | def description(self, description): 65 | """Sets the description of this PutSegmentRequest. 66 | 67 | 68 | :param description: The description of this PutSegmentRequest. # noqa: E501 69 | :type: str 70 | """ 71 | if description is None: 72 | raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 73 | if description is not None and len(description) < 1: 74 | raise ValueError("Invalid value for `description`, length must be greater than or equal to `1`") # noqa: E501 75 | 76 | self._description = description 77 | 78 | @property 79 | def rollout_percent(self): 80 | """Gets the rollout_percent of this PutSegmentRequest. # noqa: E501 81 | 82 | 83 | :return: The rollout_percent of this PutSegmentRequest. # noqa: E501 84 | :rtype: int 85 | """ 86 | return self._rollout_percent 87 | 88 | @rollout_percent.setter 89 | def rollout_percent(self, rollout_percent): 90 | """Sets the rollout_percent of this PutSegmentRequest. 91 | 92 | 93 | :param rollout_percent: The rollout_percent of this PutSegmentRequest. # noqa: E501 94 | :type: int 95 | """ 96 | if rollout_percent is None: 97 | raise ValueError("Invalid value for `rollout_percent`, must not be `None`") # noqa: E501 98 | if rollout_percent is not None and rollout_percent > 100: # noqa: E501 99 | raise ValueError("Invalid value for `rollout_percent`, must be a value less than or equal to `100`") # noqa: E501 100 | if rollout_percent is not None and rollout_percent < 0: # noqa: E501 101 | raise ValueError("Invalid value for `rollout_percent`, must be a value greater than or equal to `0`") # noqa: E501 102 | 103 | self._rollout_percent = rollout_percent 104 | 105 | def to_dict(self): 106 | """Returns the model properties as a dict""" 107 | result = {} 108 | 109 | for attr, _ in six.iteritems(self.swagger_types): 110 | value = getattr(self, attr) 111 | if isinstance(value, list): 112 | result[attr] = list(map( 113 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 114 | value 115 | )) 116 | elif hasattr(value, "to_dict"): 117 | result[attr] = value.to_dict() 118 | elif isinstance(value, dict): 119 | result[attr] = dict(map( 120 | lambda item: (item[0], item[1].to_dict()) 121 | if hasattr(item[1], "to_dict") else item, 122 | value.items() 123 | )) 124 | else: 125 | result[attr] = value 126 | if issubclass(PutSegmentRequest, dict): 127 | for key, value in self.items(): 128 | result[key] = value 129 | 130 | return result 131 | 132 | def to_str(self): 133 | """Returns the string representation of the model""" 134 | return pprint.pformat(self.to_dict()) 135 | 136 | def __repr__(self): 137 | """For `print` and `pprint`""" 138 | return self.to_str() 139 | 140 | def __eq__(self, other): 141 | """Returns true if both objects are equal""" 142 | if not isinstance(other, PutSegmentRequest): 143 | return False 144 | 145 | return self.__dict__ == other.__dict__ 146 | 147 | def __ne__(self, other): 148 | """Returns true if both objects are not equal""" 149 | return not self == other 150 | -------------------------------------------------------------------------------- /flagr/models/put_variant_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class PutVariantRequest(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'key': 'str', 35 | 'attachment': 'object' 36 | } 37 | 38 | attribute_map = { 39 | 'key': 'key', 40 | 'attachment': 'attachment' 41 | } 42 | 43 | def __init__(self, key=None, attachment=None): # noqa: E501 44 | """PutVariantRequest - a model defined in Swagger""" # noqa: E501 45 | 46 | self._key = None 47 | self._attachment = None 48 | self.discriminator = None 49 | 50 | self.key = key 51 | if attachment is not None: 52 | self.attachment = attachment 53 | 54 | @property 55 | def key(self): 56 | """Gets the key of this PutVariantRequest. # noqa: E501 57 | 58 | 59 | :return: The key of this PutVariantRequest. # noqa: E501 60 | :rtype: str 61 | """ 62 | return self._key 63 | 64 | @key.setter 65 | def key(self, key): 66 | """Sets the key of this PutVariantRequest. 67 | 68 | 69 | :param key: The key of this PutVariantRequest. # noqa: E501 70 | :type: str 71 | """ 72 | if key is None: 73 | raise ValueError("Invalid value for `key`, must not be `None`") # noqa: E501 74 | if key is not None and len(key) < 1: 75 | raise ValueError("Invalid value for `key`, length must be greater than or equal to `1`") # noqa: E501 76 | 77 | self._key = key 78 | 79 | @property 80 | def attachment(self): 81 | """Gets the attachment of this PutVariantRequest. # noqa: E501 82 | 83 | 84 | :return: The attachment of this PutVariantRequest. # noqa: E501 85 | :rtype: object 86 | """ 87 | return self._attachment 88 | 89 | @attachment.setter 90 | def attachment(self, attachment): 91 | """Sets the attachment of this PutVariantRequest. 92 | 93 | 94 | :param attachment: The attachment of this PutVariantRequest. # noqa: E501 95 | :type: object 96 | """ 97 | 98 | self._attachment = attachment 99 | 100 | def to_dict(self): 101 | """Returns the model properties as a dict""" 102 | result = {} 103 | 104 | for attr, _ in six.iteritems(self.swagger_types): 105 | value = getattr(self, attr) 106 | if isinstance(value, list): 107 | result[attr] = list(map( 108 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 109 | value 110 | )) 111 | elif hasattr(value, "to_dict"): 112 | result[attr] = value.to_dict() 113 | elif isinstance(value, dict): 114 | result[attr] = dict(map( 115 | lambda item: (item[0], item[1].to_dict()) 116 | if hasattr(item[1], "to_dict") else item, 117 | value.items() 118 | )) 119 | else: 120 | result[attr] = value 121 | if issubclass(PutVariantRequest, dict): 122 | for key, value in self.items(): 123 | result[key] = value 124 | 125 | return result 126 | 127 | def to_str(self): 128 | """Returns the string representation of the model""" 129 | return pprint.pformat(self.to_dict()) 130 | 131 | def __repr__(self): 132 | """For `print` and `pprint`""" 133 | return self.to_str() 134 | 135 | def __eq__(self, other): 136 | """Returns true if both objects are equal""" 137 | if not isinstance(other, PutVariantRequest): 138 | return False 139 | 140 | return self.__dict__ == other.__dict__ 141 | 142 | def __ne__(self, other): 143 | """Returns true if both objects are not equal""" 144 | return not self == other 145 | -------------------------------------------------------------------------------- /flagr/models/segment_debug_log.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class SegmentDebugLog(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'segment_id': 'int', 35 | 'msg': 'str' 36 | } 37 | 38 | attribute_map = { 39 | 'segment_id': 'segmentID', 40 | 'msg': 'msg' 41 | } 42 | 43 | def __init__(self, segment_id=None, msg=None): # noqa: E501 44 | """SegmentDebugLog - a model defined in Swagger""" # noqa: E501 45 | 46 | self._segment_id = None 47 | self._msg = None 48 | self.discriminator = None 49 | 50 | if segment_id is not None: 51 | self.segment_id = segment_id 52 | if msg is not None: 53 | self.msg = msg 54 | 55 | @property 56 | def segment_id(self): 57 | """Gets the segment_id of this SegmentDebugLog. # noqa: E501 58 | 59 | 60 | :return: The segment_id of this SegmentDebugLog. # noqa: E501 61 | :rtype: int 62 | """ 63 | return self._segment_id 64 | 65 | @segment_id.setter 66 | def segment_id(self, segment_id): 67 | """Sets the segment_id of this SegmentDebugLog. 68 | 69 | 70 | :param segment_id: The segment_id of this SegmentDebugLog. # noqa: E501 71 | :type: int 72 | """ 73 | if segment_id is not None and segment_id < 1: # noqa: E501 74 | raise ValueError("Invalid value for `segment_id`, must be a value greater than or equal to `1`") # noqa: E501 75 | 76 | self._segment_id = segment_id 77 | 78 | @property 79 | def msg(self): 80 | """Gets the msg of this SegmentDebugLog. # noqa: E501 81 | 82 | 83 | :return: The msg of this SegmentDebugLog. # noqa: E501 84 | :rtype: str 85 | """ 86 | return self._msg 87 | 88 | @msg.setter 89 | def msg(self, msg): 90 | """Sets the msg of this SegmentDebugLog. 91 | 92 | 93 | :param msg: The msg of this SegmentDebugLog. # noqa: E501 94 | :type: str 95 | """ 96 | 97 | self._msg = msg 98 | 99 | def to_dict(self): 100 | """Returns the model properties as a dict""" 101 | result = {} 102 | 103 | for attr, _ in six.iteritems(self.swagger_types): 104 | value = getattr(self, attr) 105 | if isinstance(value, list): 106 | result[attr] = list(map( 107 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 108 | value 109 | )) 110 | elif hasattr(value, "to_dict"): 111 | result[attr] = value.to_dict() 112 | elif isinstance(value, dict): 113 | result[attr] = dict(map( 114 | lambda item: (item[0], item[1].to_dict()) 115 | if hasattr(item[1], "to_dict") else item, 116 | value.items() 117 | )) 118 | else: 119 | result[attr] = value 120 | if issubclass(SegmentDebugLog, dict): 121 | for key, value in self.items(): 122 | result[key] = value 123 | 124 | return result 125 | 126 | def to_str(self): 127 | """Returns the string representation of the model""" 128 | return pprint.pformat(self.to_dict()) 129 | 130 | def __repr__(self): 131 | """For `print` and `pprint`""" 132 | return self.to_str() 133 | 134 | def __eq__(self, other): 135 | """Returns true if both objects are equal""" 136 | if not isinstance(other, SegmentDebugLog): 137 | return False 138 | 139 | return self.__dict__ == other.__dict__ 140 | 141 | def __ne__(self, other): 142 | """Returns true if both objects are not equal""" 143 | return not self == other 144 | -------------------------------------------------------------------------------- /flagr/models/set_flag_enabled_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class SetFlagEnabledRequest(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'enabled': 'bool' 35 | } 36 | 37 | attribute_map = { 38 | 'enabled': 'enabled' 39 | } 40 | 41 | def __init__(self, enabled=None): # noqa: E501 42 | """SetFlagEnabledRequest - a model defined in Swagger""" # noqa: E501 43 | 44 | self._enabled = None 45 | self.discriminator = None 46 | 47 | self.enabled = enabled 48 | 49 | @property 50 | def enabled(self): 51 | """Gets the enabled of this SetFlagEnabledRequest. # noqa: E501 52 | 53 | 54 | :return: The enabled of this SetFlagEnabledRequest. # noqa: E501 55 | :rtype: bool 56 | """ 57 | return self._enabled 58 | 59 | @enabled.setter 60 | def enabled(self, enabled): 61 | """Sets the enabled of this SetFlagEnabledRequest. 62 | 63 | 64 | :param enabled: The enabled of this SetFlagEnabledRequest. # noqa: E501 65 | :type: bool 66 | """ 67 | if enabled is None: 68 | raise ValueError("Invalid value for `enabled`, must not be `None`") # noqa: E501 69 | 70 | self._enabled = enabled 71 | 72 | def to_dict(self): 73 | """Returns the model properties as a dict""" 74 | result = {} 75 | 76 | for attr, _ in six.iteritems(self.swagger_types): 77 | value = getattr(self, attr) 78 | if isinstance(value, list): 79 | result[attr] = list(map( 80 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 81 | value 82 | )) 83 | elif hasattr(value, "to_dict"): 84 | result[attr] = value.to_dict() 85 | elif isinstance(value, dict): 86 | result[attr] = dict(map( 87 | lambda item: (item[0], item[1].to_dict()) 88 | if hasattr(item[1], "to_dict") else item, 89 | value.items() 90 | )) 91 | else: 92 | result[attr] = value 93 | if issubclass(SetFlagEnabledRequest, dict): 94 | for key, value in self.items(): 95 | result[key] = value 96 | 97 | return result 98 | 99 | def to_str(self): 100 | """Returns the string representation of the model""" 101 | return pprint.pformat(self.to_dict()) 102 | 103 | def __repr__(self): 104 | """For `print` and `pprint`""" 105 | return self.to_str() 106 | 107 | def __eq__(self, other): 108 | """Returns true if both objects are equal""" 109 | if not isinstance(other, SetFlagEnabledRequest): 110 | return False 111 | 112 | return self.__dict__ == other.__dict__ 113 | 114 | def __ne__(self, other): 115 | """Returns true if both objects are not equal""" 116 | return not self == other 117 | -------------------------------------------------------------------------------- /flagr/models/tag.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class Tag(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'id': 'int', 35 | 'value': 'str' 36 | } 37 | 38 | attribute_map = { 39 | 'id': 'id', 40 | 'value': 'value' 41 | } 42 | 43 | def __init__(self, id=None, value=None): # noqa: E501 44 | """Tag - a model defined in Swagger""" # noqa: E501 45 | 46 | self._id = None 47 | self._value = None 48 | self.discriminator = None 49 | 50 | if id is not None: 51 | self.id = id 52 | self.value = value 53 | 54 | @property 55 | def id(self): 56 | """Gets the id of this Tag. # noqa: E501 57 | 58 | 59 | :return: The id of this Tag. # noqa: E501 60 | :rtype: int 61 | """ 62 | return self._id 63 | 64 | @id.setter 65 | def id(self, id): 66 | """Sets the id of this Tag. 67 | 68 | 69 | :param id: The id of this Tag. # noqa: E501 70 | :type: int 71 | """ 72 | if id is not None and id < 1: # noqa: E501 73 | raise ValueError("Invalid value for `id`, must be a value greater than or equal to `1`") # noqa: E501 74 | 75 | self._id = id 76 | 77 | @property 78 | def value(self): 79 | """Gets the value of this Tag. # noqa: E501 80 | 81 | 82 | :return: The value of this Tag. # noqa: E501 83 | :rtype: str 84 | """ 85 | return self._value 86 | 87 | @value.setter 88 | def value(self, value): 89 | """Sets the value of this Tag. 90 | 91 | 92 | :param value: The value of this Tag. # noqa: E501 93 | :type: str 94 | """ 95 | if value is None: 96 | raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 97 | if value is not None and len(value) < 1: 98 | raise ValueError("Invalid value for `value`, length must be greater than or equal to `1`") # noqa: E501 99 | 100 | self._value = value 101 | 102 | def to_dict(self): 103 | """Returns the model properties as a dict""" 104 | result = {} 105 | 106 | for attr, _ in six.iteritems(self.swagger_types): 107 | value = getattr(self, attr) 108 | if isinstance(value, list): 109 | result[attr] = list(map( 110 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 111 | value 112 | )) 113 | elif hasattr(value, "to_dict"): 114 | result[attr] = value.to_dict() 115 | elif isinstance(value, dict): 116 | result[attr] = dict(map( 117 | lambda item: (item[0], item[1].to_dict()) 118 | if hasattr(item[1], "to_dict") else item, 119 | value.items() 120 | )) 121 | else: 122 | result[attr] = value 123 | if issubclass(Tag, dict): 124 | for key, value in self.items(): 125 | result[key] = value 126 | 127 | return result 128 | 129 | def to_str(self): 130 | """Returns the string representation of the model""" 131 | return pprint.pformat(self.to_dict()) 132 | 133 | def __repr__(self): 134 | """For `print` and `pprint`""" 135 | return self.to_str() 136 | 137 | def __eq__(self, other): 138 | """Returns true if both objects are equal""" 139 | if not isinstance(other, Tag): 140 | return False 141 | 142 | return self.__dict__ == other.__dict__ 143 | 144 | def __ne__(self, other): 145 | """Returns true if both objects are not equal""" 146 | return not self == other 147 | -------------------------------------------------------------------------------- /flagr/models/variant.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | import pprint 15 | import re # noqa: F401 16 | 17 | import six 18 | 19 | 20 | class Variant(object): 21 | """NOTE: This class is auto generated by the swagger code generator program. 22 | 23 | Do not edit the class manually. 24 | """ 25 | 26 | """ 27 | Attributes: 28 | swagger_types (dict): The key is attribute name 29 | and the value is attribute type. 30 | attribute_map (dict): The key is attribute name 31 | and the value is json key in definition. 32 | """ 33 | swagger_types = { 34 | 'id': 'int', 35 | 'key': 'str', 36 | 'attachment': 'object' 37 | } 38 | 39 | attribute_map = { 40 | 'id': 'id', 41 | 'key': 'key', 42 | 'attachment': 'attachment' 43 | } 44 | 45 | def __init__(self, id=None, key=None, attachment=None): # noqa: E501 46 | """Variant - a model defined in Swagger""" # noqa: E501 47 | 48 | self._id = None 49 | self._key = None 50 | self._attachment = None 51 | self.discriminator = None 52 | 53 | if id is not None: 54 | self.id = id 55 | self.key = key 56 | if attachment is not None: 57 | self.attachment = attachment 58 | 59 | @property 60 | def id(self): 61 | """Gets the id of this Variant. # noqa: E501 62 | 63 | 64 | :return: The id of this Variant. # noqa: E501 65 | :rtype: int 66 | """ 67 | return self._id 68 | 69 | @id.setter 70 | def id(self, id): 71 | """Sets the id of this Variant. 72 | 73 | 74 | :param id: The id of this Variant. # noqa: E501 75 | :type: int 76 | """ 77 | if id is not None and id < 1: # noqa: E501 78 | raise ValueError("Invalid value for `id`, must be a value greater than or equal to `1`") # noqa: E501 79 | 80 | self._id = id 81 | 82 | @property 83 | def key(self): 84 | """Gets the key of this Variant. # noqa: E501 85 | 86 | 87 | :return: The key of this Variant. # noqa: E501 88 | :rtype: str 89 | """ 90 | return self._key 91 | 92 | @key.setter 93 | def key(self, key): 94 | """Sets the key of this Variant. 95 | 96 | 97 | :param key: The key of this Variant. # noqa: E501 98 | :type: str 99 | """ 100 | if key is None: 101 | raise ValueError("Invalid value for `key`, must not be `None`") # noqa: E501 102 | if key is not None and len(key) < 1: 103 | raise ValueError("Invalid value for `key`, length must be greater than or equal to `1`") # noqa: E501 104 | 105 | self._key = key 106 | 107 | @property 108 | def attachment(self): 109 | """Gets the attachment of this Variant. # noqa: E501 110 | 111 | 112 | :return: The attachment of this Variant. # noqa: E501 113 | :rtype: object 114 | """ 115 | return self._attachment 116 | 117 | @attachment.setter 118 | def attachment(self, attachment): 119 | """Sets the attachment of this Variant. 120 | 121 | 122 | :param attachment: The attachment of this Variant. # noqa: E501 123 | :type: object 124 | """ 125 | 126 | self._attachment = attachment 127 | 128 | def to_dict(self): 129 | """Returns the model properties as a dict""" 130 | result = {} 131 | 132 | for attr, _ in six.iteritems(self.swagger_types): 133 | value = getattr(self, attr) 134 | if isinstance(value, list): 135 | result[attr] = list(map( 136 | lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 137 | value 138 | )) 139 | elif hasattr(value, "to_dict"): 140 | result[attr] = value.to_dict() 141 | elif isinstance(value, dict): 142 | result[attr] = dict(map( 143 | lambda item: (item[0], item[1].to_dict()) 144 | if hasattr(item[1], "to_dict") else item, 145 | value.items() 146 | )) 147 | else: 148 | result[attr] = value 149 | if issubclass(Variant, dict): 150 | for key, value in self.items(): 151 | result[key] = value 152 | 153 | return result 154 | 155 | def to_str(self): 156 | """Returns the string representation of the model""" 157 | return pprint.pformat(self.to_dict()) 158 | 159 | def __repr__(self): 160 | """For `print` and `pprint`""" 161 | return self.to_str() 162 | 163 | def __eq__(self, other): 164 | """Returns true if both objects are equal""" 165 | if not isinstance(other, Variant): 166 | return False 167 | 168 | return self.__dict__ == other.__dict__ 169 | 170 | def __ne__(self, other): 171 | """Returns true if both objects are not equal""" 172 | return not self == other 173 | -------------------------------------------------------------------------------- /git_push.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ 3 | # 4 | # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" 5 | 6 | git_user_id=$1 7 | git_repo_id=$2 8 | release_note=$3 9 | 10 | if [ "$git_user_id" = "" ]; then 11 | git_user_id="GIT_USER_ID" 12 | echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" 13 | fi 14 | 15 | if [ "$git_repo_id" = "" ]; then 16 | git_repo_id="GIT_REPO_ID" 17 | echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" 18 | fi 19 | 20 | if [ "$release_note" = "" ]; then 21 | release_note="Minor update" 22 | echo "[INFO] No command line input provided. Set \$release_note to $release_note" 23 | fi 24 | 25 | # Initialize the local directory as a Git repository 26 | git init 27 | 28 | # Adds the files in the local repository and stages them for commit. 29 | git add . 30 | 31 | # Commits the tracked changes and prepares them to be pushed to a remote repository. 32 | git commit -m "$release_note" 33 | 34 | # Sets the new remote 35 | git_remote=`git remote` 36 | if [ "$git_remote" = "" ]; then # git remote not defined 37 | 38 | if [ "$GIT_TOKEN" = "" ]; then 39 | echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." 40 | git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git 41 | else 42 | git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git 43 | fi 44 | 45 | fi 46 | 47 | git pull origin master 48 | 49 | # Pushes (Forces) the changes in the local repository up to the remote repository 50 | echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" 51 | git push origin master 2>&1 | grep -v 'To https' 52 | 53 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | certifi >= 14.05.14 2 | six >= 1.10 3 | python_dateutil >= 2.5.3 4 | setuptools >= 21.0.0 5 | urllib3 >= 1.15.1 6 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from setuptools import setup, find_packages # noqa: H301 15 | 16 | NAME = "flagr" 17 | VERSION = "1.1.10" 18 | # To install the library, run the following 19 | # 20 | # python setup.py install 21 | # 22 | # prerequisite: setuptools 23 | # http://pypi.python.org/pypi/setuptools 24 | 25 | REQUIRES = [ 26 | "certifi>=2017.4.17", 27 | "python-dateutil>=2.1", 28 | "six>=1.10", 29 | "urllib3>=1.23" 30 | ] 31 | 32 | 33 | setup( 34 | name=NAME, 35 | version=VERSION, 36 | description="Flagr", 37 | author_email="", 38 | url="https://github.com/checkr/pyflagr", 39 | keywords=["Swagger", "Flagr"], 40 | install_requires=REQUIRES, 41 | packages=find_packages(), 42 | include_package_data=True, 43 | long_description="""\ 44 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 45 | """ 46 | ) 47 | -------------------------------------------------------------------------------- /swagger_py.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageName": "flagr", 3 | "projectName": "flagr", 4 | "packageVersion": "1.1.10", 5 | "packageUrl": "https://github.com/checkr/pyflagr" 6 | } 7 | -------------------------------------------------------------------------------- /test-requirements.txt: -------------------------------------------------------------------------------- 1 | coverage>=4.0.3 2 | nose>=1.3.7 3 | pluggy>=0.3.1 4 | py>=1.4.31 5 | randomize>=0.13 6 | -------------------------------------------------------------------------------- /test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/checkr/pyflagr/c2af160275208cdba135385cc52acafea5f3ecb7/test/__init__.py -------------------------------------------------------------------------------- /test/test_constraint.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.constraint import Constraint # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestConstraint(unittest.TestCase): 24 | """Constraint unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testConstraint(self): 33 | """Test Constraint""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.constraint.Constraint() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_constraint_api.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.api.constraint_api import ConstraintApi # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestConstraintApi(unittest.TestCase): 24 | """ConstraintApi unit test stubs""" 25 | 26 | def setUp(self): 27 | self.api = flagr.api.constraint_api.ConstraintApi() # noqa: E501 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def test_create_constraint(self): 33 | """Test case for create_constraint 34 | 35 | """ 36 | pass 37 | 38 | def test_delete_constraint(self): 39 | """Test case for delete_constraint 40 | 41 | """ 42 | pass 43 | 44 | def test_find_constraints(self): 45 | """Test case for find_constraints 46 | 47 | """ 48 | pass 49 | 50 | def test_put_constraint(self): 51 | """Test case for put_constraint 52 | 53 | """ 54 | pass 55 | 56 | 57 | if __name__ == '__main__': 58 | unittest.main() 59 | -------------------------------------------------------------------------------- /test/test_create_constraint_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.create_constraint_request import CreateConstraintRequest # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestCreateConstraintRequest(unittest.TestCase): 24 | """CreateConstraintRequest unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testCreateConstraintRequest(self): 33 | """Test CreateConstraintRequest""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.create_constraint_request.CreateConstraintRequest() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_create_flag_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.create_flag_request import CreateFlagRequest # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestCreateFlagRequest(unittest.TestCase): 24 | """CreateFlagRequest unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testCreateFlagRequest(self): 33 | """Test CreateFlagRequest""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.create_flag_request.CreateFlagRequest() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_create_segment_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.create_segment_request import CreateSegmentRequest # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestCreateSegmentRequest(unittest.TestCase): 24 | """CreateSegmentRequest unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testCreateSegmentRequest(self): 33 | """Test CreateSegmentRequest""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.create_segment_request.CreateSegmentRequest() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_create_tag_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.create_tag_request import CreateTagRequest # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestCreateTagRequest(unittest.TestCase): 24 | """CreateTagRequest unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testCreateTagRequest(self): 33 | """Test CreateTagRequest""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.create_tag_request.CreateTagRequest() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_create_variant_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.create_variant_request import CreateVariantRequest # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestCreateVariantRequest(unittest.TestCase): 24 | """CreateVariantRequest unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testCreateVariantRequest(self): 33 | """Test CreateVariantRequest""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.create_variant_request.CreateVariantRequest() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_distribution.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.distribution import Distribution # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestDistribution(unittest.TestCase): 24 | """Distribution unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testDistribution(self): 33 | """Test Distribution""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.distribution.Distribution() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_distribution_api.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.api.distribution_api import DistributionApi # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestDistributionApi(unittest.TestCase): 24 | """DistributionApi unit test stubs""" 25 | 26 | def setUp(self): 27 | self.api = flagr.api.distribution_api.DistributionApi() # noqa: E501 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def test_find_distributions(self): 33 | """Test case for find_distributions 34 | 35 | """ 36 | pass 37 | 38 | def test_put_distributions(self): 39 | """Test case for put_distributions 40 | 41 | """ 42 | pass 43 | 44 | 45 | if __name__ == '__main__': 46 | unittest.main() 47 | -------------------------------------------------------------------------------- /test/test_error.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.error import Error # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestError(unittest.TestCase): 24 | """Error unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testError(self): 33 | """Test Error""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.error.Error() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_eval_context.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.eval_context import EvalContext # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestEvalContext(unittest.TestCase): 24 | """EvalContext unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testEvalContext(self): 33 | """Test EvalContext""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.eval_context.EvalContext() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_eval_debug_log.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.eval_debug_log import EvalDebugLog # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestEvalDebugLog(unittest.TestCase): 24 | """EvalDebugLog unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testEvalDebugLog(self): 33 | """Test EvalDebugLog""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.eval_debug_log.EvalDebugLog() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_eval_result.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.eval_result import EvalResult # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestEvalResult(unittest.TestCase): 24 | """EvalResult unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testEvalResult(self): 33 | """Test EvalResult""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.eval_result.EvalResult() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_evaluation_api.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.api.evaluation_api import EvaluationApi # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestEvaluationApi(unittest.TestCase): 24 | """EvaluationApi unit test stubs""" 25 | 26 | def setUp(self): 27 | self.api = flagr.api.evaluation_api.EvaluationApi() # noqa: E501 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def test_post_evaluation(self): 33 | """Test case for post_evaluation 34 | 35 | """ 36 | pass 37 | 38 | def test_post_evaluation_batch(self): 39 | """Test case for post_evaluation_batch 40 | 41 | """ 42 | pass 43 | 44 | 45 | if __name__ == '__main__': 46 | unittest.main() 47 | -------------------------------------------------------------------------------- /test/test_evaluation_batch_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.evaluation_batch_request import EvaluationBatchRequest # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestEvaluationBatchRequest(unittest.TestCase): 24 | """EvaluationBatchRequest unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testEvaluationBatchRequest(self): 33 | """Test EvaluationBatchRequest""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.evaluation_batch_request.EvaluationBatchRequest() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_evaluation_batch_response.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.evaluation_batch_response import EvaluationBatchResponse # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestEvaluationBatchResponse(unittest.TestCase): 24 | """EvaluationBatchResponse unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testEvaluationBatchResponse(self): 33 | """Test EvaluationBatchResponse""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.evaluation_batch_response.EvaluationBatchResponse() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_evaluation_entity.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.evaluation_entity import EvaluationEntity # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestEvaluationEntity(unittest.TestCase): 24 | """EvaluationEntity unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testEvaluationEntity(self): 33 | """Test EvaluationEntity""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.evaluation_entity.EvaluationEntity() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_export_api.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.api.export_api import ExportApi # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestExportApi(unittest.TestCase): 24 | """ExportApi unit test stubs""" 25 | 26 | def setUp(self): 27 | self.api = flagr.api.export_api.ExportApi() # noqa: E501 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def test_get_export_sq_lite(self): 33 | """Test case for get_export_sq_lite 34 | 35 | """ 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_flag.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.flag import Flag # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestFlag(unittest.TestCase): 24 | """Flag unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testFlag(self): 33 | """Test Flag""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.flag.Flag() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_flag_api.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.api.flag_api import FlagApi # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestFlagApi(unittest.TestCase): 24 | """FlagApi unit test stubs""" 25 | 26 | def setUp(self): 27 | self.api = flagr.api.flag_api.FlagApi() # noqa: E501 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def test_create_flag(self): 33 | """Test case for create_flag 34 | 35 | """ 36 | pass 37 | 38 | def test_delete_flag(self): 39 | """Test case for delete_flag 40 | 41 | """ 42 | pass 43 | 44 | def test_find_flags(self): 45 | """Test case for find_flags 46 | 47 | """ 48 | pass 49 | 50 | def test_get_flag(self): 51 | """Test case for get_flag 52 | 53 | """ 54 | pass 55 | 56 | def test_get_flag_snapshots(self): 57 | """Test case for get_flag_snapshots 58 | 59 | """ 60 | pass 61 | 62 | def test_put_flag(self): 63 | """Test case for put_flag 64 | 65 | """ 66 | pass 67 | 68 | def test_set_flag_enabled(self): 69 | """Test case for set_flag_enabled 70 | 71 | """ 72 | pass 73 | 74 | 75 | if __name__ == '__main__': 76 | unittest.main() 77 | -------------------------------------------------------------------------------- /test/test_flag_snapshot.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.flag_snapshot import FlagSnapshot # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestFlagSnapshot(unittest.TestCase): 24 | """FlagSnapshot unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testFlagSnapshot(self): 33 | """Test FlagSnapshot""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.flag_snapshot.FlagSnapshot() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_health.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.8 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.health import Health # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestHealth(unittest.TestCase): 24 | """Health unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testHealth(self): 33 | """Test Health""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.health.Health() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_health_api.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.api.health_api import HealthApi # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestHealthApi(unittest.TestCase): 24 | """HealthApi unit test stubs""" 25 | 26 | def setUp(self): 27 | self.api = flagr.api.health_api.HealthApi() # noqa: E501 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def test_get_health(self): 33 | """Test case for get_health 34 | 35 | """ 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_put_distributions_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.put_distributions_request import PutDistributionsRequest # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestPutDistributionsRequest(unittest.TestCase): 24 | """PutDistributionsRequest unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testPutDistributionsRequest(self): 33 | """Test PutDistributionsRequest""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.put_distributions_request.PutDistributionsRequest() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_put_flag_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.put_flag_request import PutFlagRequest # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestPutFlagRequest(unittest.TestCase): 24 | """PutFlagRequest unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testPutFlagRequest(self): 33 | """Test PutFlagRequest""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.put_flag_request.PutFlagRequest() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_put_segment_reorder_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.put_segment_reorder_request import PutSegmentReorderRequest # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestPutSegmentReorderRequest(unittest.TestCase): 24 | """PutSegmentReorderRequest unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testPutSegmentReorderRequest(self): 33 | """Test PutSegmentReorderRequest""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.put_segment_reorder_request.PutSegmentReorderRequest() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_put_segment_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.put_segment_request import PutSegmentRequest # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestPutSegmentRequest(unittest.TestCase): 24 | """PutSegmentRequest unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testPutSegmentRequest(self): 33 | """Test PutSegmentRequest""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.put_segment_request.PutSegmentRequest() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_put_variant_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.put_variant_request import PutVariantRequest # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestPutVariantRequest(unittest.TestCase): 24 | """PutVariantRequest unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testPutVariantRequest(self): 33 | """Test PutVariantRequest""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.put_variant_request.PutVariantRequest() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_segment.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.segment import Segment # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestSegment(unittest.TestCase): 24 | """Segment unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testSegment(self): 33 | """Test Segment""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.segment.Segment() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_segment_api.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.api.segment_api import SegmentApi # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestSegmentApi(unittest.TestCase): 24 | """SegmentApi unit test stubs""" 25 | 26 | def setUp(self): 27 | self.api = flagr.api.segment_api.SegmentApi() # noqa: E501 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def test_create_segment(self): 33 | """Test case for create_segment 34 | 35 | """ 36 | pass 37 | 38 | def test_delete_segment(self): 39 | """Test case for delete_segment 40 | 41 | """ 42 | pass 43 | 44 | def test_find_segments(self): 45 | """Test case for find_segments 46 | 47 | """ 48 | pass 49 | 50 | def test_put_segment(self): 51 | """Test case for put_segment 52 | 53 | """ 54 | pass 55 | 56 | def test_put_segments_reorder(self): 57 | """Test case for put_segments_reorder 58 | 59 | """ 60 | pass 61 | 62 | 63 | if __name__ == '__main__': 64 | unittest.main() 65 | -------------------------------------------------------------------------------- /test/test_segment_debug_log.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.segment_debug_log import SegmentDebugLog # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestSegmentDebugLog(unittest.TestCase): 24 | """SegmentDebugLog unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testSegmentDebugLog(self): 33 | """Test SegmentDebugLog""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.segment_debug_log.SegmentDebugLog() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_set_flag_enabled_request.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.set_flag_enabled_request import SetFlagEnabledRequest # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestSetFlagEnabledRequest(unittest.TestCase): 24 | """SetFlagEnabledRequest unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testSetFlagEnabledRequest(self): 33 | """Test SetFlagEnabledRequest""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.set_flag_enabled_request.SetFlagEnabledRequest() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_tag.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.tag import Tag # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestTag(unittest.TestCase): 24 | """Tag unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testTag(self): 33 | """Test Tag""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.tag.Tag() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_tag_api.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is \"/api/v1\". # noqa: E501 7 | 8 | OpenAPI spec version: 1.1.10 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.api.tag_api import TagApi # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestTagApi(unittest.TestCase): 24 | """TagApi unit test stubs""" 25 | 26 | def setUp(self): 27 | self.api = flagr.api.tag_api.TagApi() # noqa: E501 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def test_create_tag(self): 33 | """Test case for create_tag 34 | 35 | """ 36 | pass 37 | 38 | def test_delete_tag(self): 39 | """Test case for delete_tag 40 | 41 | """ 42 | pass 43 | 44 | def test_find_all_tags(self): 45 | """Test case for find_all_tags 46 | 47 | """ 48 | pass 49 | 50 | def test_find_tags(self): 51 | """Test case for find_tags 52 | 53 | """ 54 | pass 55 | 56 | 57 | if __name__ == '__main__': 58 | unittest.main() 59 | -------------------------------------------------------------------------------- /test/test_variant.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.models.variant import Variant # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestVariant(unittest.TestCase): 24 | """Variant unit test stubs""" 25 | 26 | def setUp(self): 27 | pass 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def testVariant(self): 33 | """Test Variant""" 34 | # FIXME: construct object with mandatory attributes with example values 35 | # model = flagr.models.variant.Variant() # noqa: E501 36 | pass 37 | 38 | 39 | if __name__ == '__main__': 40 | unittest.main() 41 | -------------------------------------------------------------------------------- /test/test_variant_api.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | Flagr 5 | 6 | Flagr is a feature flagging, A/B testing and dynamic configuration microservice # noqa: E501 7 | 8 | OpenAPI spec version: 1.0.0 9 | 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | """ 12 | 13 | 14 | from __future__ import absolute_import 15 | 16 | import unittest 17 | 18 | import flagr 19 | from flagr.api.variant_api import VariantApi # noqa: E501 20 | from flagr.rest import ApiException 21 | 22 | 23 | class TestVariantApi(unittest.TestCase): 24 | """VariantApi unit test stubs""" 25 | 26 | def setUp(self): 27 | self.api = flagr.api.variant_api.VariantApi() # noqa: E501 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def test_create_variant(self): 33 | """Test case for create_variant 34 | 35 | """ 36 | pass 37 | 38 | def test_delete_variant(self): 39 | """Test case for delete_variant 40 | 41 | """ 42 | pass 43 | 44 | def test_find_variants(self): 45 | """Test case for find_variants 46 | 47 | """ 48 | pass 49 | 50 | def test_put_variant(self): 51 | """Test case for put_variant 52 | 53 | """ 54 | pass 55 | 56 | 57 | if __name__ == '__main__': 58 | unittest.main() 59 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = py27, py3 3 | 4 | [testenv] 5 | deps=-r{toxinidir}/requirements.txt 6 | -r{toxinidir}/test-requirements.txt 7 | 8 | commands= 9 | nosetests \ 10 | [] 11 | --------------------------------------------------------------------------------