|
| 1 | +# flagr |
| 2 | +Flagr is a feature flagging, A/B testing and dynamic configuration microservice |
| 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.0.0 |
| 7 | +- Package version: 0.1.0 |
| 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 | +# create an instance of the API class |
| 54 | +api_instance = flagr.ConstraintApi() |
| 55 | +flag_id = 789 # int | numeric ID of the flag |
| 56 | +segment_id = 789 # int | numeric ID of the segment |
| 57 | +body = flagr.CreateConstraintRequest() # CreateConstraintRequest | create a constraint |
| 58 | + |
| 59 | +try: |
| 60 | + api_response = api_instance.create_constraint(flag_id, segment_id, body) |
| 61 | + pprint(api_response) |
| 62 | +except ApiException as e: |
| 63 | + print("Exception when calling ConstraintApi->create_constraint: %s\n" % e) |
| 64 | + |
| 65 | +``` |
| 66 | + |
| 67 | +## Documentation for API Endpoints |
| 68 | + |
| 69 | +All URIs are relative to *http://localhost/api/v1* |
| 70 | + |
| 71 | +Class | Method | HTTP request | Description |
| 72 | +------------ | ------------- | ------------- | ------------- |
| 73 | +*ConstraintApi* | [**create_constraint**](docs/ConstraintApi.md#create_constraint) | **POST** /flags/{flagID}/segments/{segmentID}/constraints | |
| 74 | +*ConstraintApi* | [**delete_constraint**](docs/ConstraintApi.md#delete_constraint) | **DELETE** /flags/{flagID}/segments/{segmentID}/constraints/{constraintID} | |
| 75 | +*ConstraintApi* | [**find_constraints**](docs/ConstraintApi.md#find_constraints) | **GET** /flags/{flagID}/segments/{segmentID}/constraints | |
| 76 | +*ConstraintApi* | [**put_constraint**](docs/ConstraintApi.md#put_constraint) | **PUT** /flags/{flagID}/segments/{segmentID}/constraints/{constraintID} | |
| 77 | +*DistributionApi* | [**find_distributions**](docs/DistributionApi.md#find_distributions) | **GET** /flags/{flagID}/segments/{segmentID}/distributions | |
| 78 | +*DistributionApi* | [**put_distributions**](docs/DistributionApi.md#put_distributions) | **PUT** /flags/{flagID}/segments/{segmentID}/distributions | |
| 79 | +*EvaluationApi* | [**post_evaluation**](docs/EvaluationApi.md#post_evaluation) | **POST** /evaluation | |
| 80 | +*EvaluationApi* | [**post_evaluation_batch**](docs/EvaluationApi.md#post_evaluation_batch) | **POST** /evaluation/batch | |
| 81 | +*FlagApi* | [**create_flag**](docs/FlagApi.md#create_flag) | **POST** /flags | |
| 82 | +*FlagApi* | [**delete_flag**](docs/FlagApi.md#delete_flag) | **DELETE** /flags/{flagID} | |
| 83 | +*FlagApi* | [**find_flags**](docs/FlagApi.md#find_flags) | **GET** /flags | |
| 84 | +*FlagApi* | [**get_flag**](docs/FlagApi.md#get_flag) | **GET** /flags/{flagID} | |
| 85 | +*FlagApi* | [**get_flag_snapshots**](docs/FlagApi.md#get_flag_snapshots) | **GET** /flags/{flagID}/snapshots | |
| 86 | +*FlagApi* | [**put_flag**](docs/FlagApi.md#put_flag) | **PUT** /flags/{flagID} | |
| 87 | +*FlagApi* | [**set_flag_enabled**](docs/FlagApi.md#set_flag_enabled) | **PUT** /flags/{flagID}/enabled | |
| 88 | +*SegmentApi* | [**create_segment**](docs/SegmentApi.md#create_segment) | **POST** /flags/{flagID}/segments | |
| 89 | +*SegmentApi* | [**delete_segment**](docs/SegmentApi.md#delete_segment) | **DELETE** /flags/{flagID}/segments/{segmentID} | |
| 90 | +*SegmentApi* | [**find_segments**](docs/SegmentApi.md#find_segments) | **GET** /flags/{flagID}/segments | |
| 91 | +*SegmentApi* | [**put_segment**](docs/SegmentApi.md#put_segment) | **PUT** /flags/{flagID}/segments/{segmentID} | |
| 92 | +*SegmentApi* | [**put_segments_reorder**](docs/SegmentApi.md#put_segments_reorder) | **PUT** /flags/{flagID}/segments/reorder | |
| 93 | +*VariantApi* | [**create_variant**](docs/VariantApi.md#create_variant) | **POST** /flags/{flagID}/variants | |
| 94 | +*VariantApi* | [**delete_variant**](docs/VariantApi.md#delete_variant) | **DELETE** /flags/{flagID}/variants/{variantID} | |
| 95 | +*VariantApi* | [**find_variants**](docs/VariantApi.md#find_variants) | **GET** /flags/{flagID}/variants | |
| 96 | +*VariantApi* | [**put_variant**](docs/VariantApi.md#put_variant) | **PUT** /flags/{flagID}/variants/{variantID} | |
| 97 | + |
| 98 | + |
| 99 | +## Documentation For Models |
| 100 | + |
| 101 | + - [Constraint](docs/Constraint.md) |
| 102 | + - [CreateConstraintRequest](docs/CreateConstraintRequest.md) |
| 103 | + - [CreateFlagRequest](docs/CreateFlagRequest.md) |
| 104 | + - [CreateSegmentRequest](docs/CreateSegmentRequest.md) |
| 105 | + - [CreateVariantRequest](docs/CreateVariantRequest.md) |
| 106 | + - [Distribution](docs/Distribution.md) |
| 107 | + - [Error](docs/Error.md) |
| 108 | + - [EvalContext](docs/EvalContext.md) |
| 109 | + - [EvalDebugLog](docs/EvalDebugLog.md) |
| 110 | + - [EvalResult](docs/EvalResult.md) |
| 111 | + - [EvaluationBatchRequest](docs/EvaluationBatchRequest.md) |
| 112 | + - [EvaluationBatchResponse](docs/EvaluationBatchResponse.md) |
| 113 | + - [EvaluationEntity](docs/EvaluationEntity.md) |
| 114 | + - [Flag](docs/Flag.md) |
| 115 | + - [FlagSnapshot](docs/FlagSnapshot.md) |
| 116 | + - [PutDistributionsRequest](docs/PutDistributionsRequest.md) |
| 117 | + - [PutFlagRequest](docs/PutFlagRequest.md) |
| 118 | + - [PutSegmentReorderRequest](docs/PutSegmentReorderRequest.md) |
| 119 | + - [PutSegmentRequest](docs/PutSegmentRequest.md) |
| 120 | + - [PutVariantRequest](docs/PutVariantRequest.md) |
| 121 | + - [Segment](docs/Segment.md) |
| 122 | + - [SegmentDebugLog](docs/SegmentDebugLog.md) |
| 123 | + - [SetFlagEnabledRequest](docs/SetFlagEnabledRequest.md) |
| 124 | + - [Variant](docs/Variant.md) |
| 125 | + |
| 126 | + |
| 127 | +## Documentation For Authorization |
| 128 | + |
| 129 | + All endpoints do not require authorization. |
| 130 | + |
| 131 | + |
| 132 | +## Author |
| 133 | + |
| 134 | + |
| 135 | + |
0 commit comments