Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is "/api/v1".
This Python package is automatically generated by the Swagger Codegen project:
- API version: 1.1.10
- Package version: 1.1.10
- Build package: io.swagger.codegen.languages.PythonClientCodegen
Python 2.7 and 3.4+
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
Then import the package:
import flagr
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import flagr
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import flagr
from flagr.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = flagr.ConstraintApi(flagr.ApiClient(configuration))
flag_id = 789 # int | numeric ID of the flag
segment_id = 789 # int | numeric ID of the segment
body = flagr.CreateConstraintRequest() # CreateConstraintRequest | create a constraint
try:
api_response = api_instance.create_constraint(flag_id, segment_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ConstraintApi->create_constraint: %s\n" % e)
All URIs are relative to http://localhost/api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
ConstraintApi | create_constraint | POST /flags/{flagID}/segments/{segmentID}/constraints | |
ConstraintApi | delete_constraint | DELETE /flags/{flagID}/segments/{segmentID}/constraints/{constraintID} | |
ConstraintApi | find_constraints | GET /flags/{flagID}/segments/{segmentID}/constraints | |
ConstraintApi | put_constraint | PUT /flags/{flagID}/segments/{segmentID}/constraints/{constraintID} | |
DistributionApi | find_distributions | GET /flags/{flagID}/segments/{segmentID}/distributions | |
DistributionApi | put_distributions | PUT /flags/{flagID}/segments/{segmentID}/distributions | |
EvaluationApi | post_evaluation | POST /evaluation | |
EvaluationApi | post_evaluation_batch | POST /evaluation/batch | |
ExportApi | get_export_eval_cache_json | GET /export/eval_cache/json | |
ExportApi | get_export_sqlite | GET /export/sqlite | |
FlagApi | create_flag | POST /flags | |
FlagApi | delete_flag | DELETE /flags/{flagID} | |
FlagApi | find_flags | GET /flags | |
FlagApi | get_flag | GET /flags/{flagID} | |
FlagApi | get_flag_entity_types | GET /flags/entity_types | |
FlagApi | get_flag_snapshots | GET /flags/{flagID}/snapshots | |
FlagApi | put_flag | PUT /flags/{flagID} | |
FlagApi | set_flag_enabled | PUT /flags/{flagID}/enabled | |
HealthApi | get_health | GET /health | |
SegmentApi | create_segment | POST /flags/{flagID}/segments | |
SegmentApi | delete_segment | DELETE /flags/{flagID}/segments/{segmentID} | |
SegmentApi | find_segments | GET /flags/{flagID}/segments | |
SegmentApi | put_segment | PUT /flags/{flagID}/segments/{segmentID} | |
SegmentApi | put_segments_reorder | PUT /flags/{flagID}/segments/reorder | |
TagApi | create_tag | POST /flags/{flagID}/tags | |
TagApi | delete_tag | DELETE /flags/{flagID}/tags/{tagID} | |
TagApi | find_all_tags | GET /tags | |
TagApi | find_tags | GET /flags/{flagID}/tags | |
VariantApi | create_variant | POST /flags/{flagID}/variants | |
VariantApi | delete_variant | DELETE /flags/{flagID}/variants/{variantID} | |
VariantApi | find_variants | GET /flags/{flagID}/variants | |
VariantApi | put_variant | PUT /flags/{flagID}/variants/{variantID} |
- Constraint
- CreateConstraintRequest
- CreateFlagRequest
- CreateSegmentRequest
- CreateTagRequest
- CreateVariantRequest
- Distribution
- Error
- EvalContext
- EvalDebugLog
- EvalResult
- EvaluationBatchRequest
- EvaluationBatchResponse
- EvaluationEntity
- Flag
- FlagSnapshot
- Health
- PutDistributionsRequest
- PutFlagRequest
- PutSegmentReorderRequest
- PutSegmentRequest
- PutVariantRequest
- Segment
- SegmentDebugLog
- SetFlagEnabledRequest
- Tag
- Variant
All endpoints do not require authorization.