Home

Awesome

flagr

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:

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

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 

Setuptools

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

Getting Started

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)

Documentation for API Endpoints

All URIs are relative to http://localhost/api/v1

ClassMethodHTTP requestDescription
ConstraintApicreate_constraintPOST /flags/{flagID}/segments/{segmentID}/constraints
ConstraintApidelete_constraintDELETE /flags/{flagID}/segments/{segmentID}/constraints/{constraintID}
ConstraintApifind_constraintsGET /flags/{flagID}/segments/{segmentID}/constraints
ConstraintApiput_constraintPUT /flags/{flagID}/segments/{segmentID}/constraints/{constraintID}
DistributionApifind_distributionsGET /flags/{flagID}/segments/{segmentID}/distributions
DistributionApiput_distributionsPUT /flags/{flagID}/segments/{segmentID}/distributions
EvaluationApipost_evaluationPOST /evaluation
EvaluationApipost_evaluation_batchPOST /evaluation/batch
ExportApiget_export_eval_cache_jsonGET /export/eval_cache/json
ExportApiget_export_sqliteGET /export/sqlite
FlagApicreate_flagPOST /flags
FlagApidelete_flagDELETE /flags/{flagID}
FlagApifind_flagsGET /flags
FlagApiget_flagGET /flags/{flagID}
FlagApiget_flag_entity_typesGET /flags/entity_types
FlagApiget_flag_snapshotsGET /flags/{flagID}/snapshots
FlagApiput_flagPUT /flags/{flagID}
FlagApiset_flag_enabledPUT /flags/{flagID}/enabled
HealthApiget_healthGET /health
SegmentApicreate_segmentPOST /flags/{flagID}/segments
SegmentApidelete_segmentDELETE /flags/{flagID}/segments/{segmentID}
SegmentApifind_segmentsGET /flags/{flagID}/segments
SegmentApiput_segmentPUT /flags/{flagID}/segments/{segmentID}
SegmentApiput_segments_reorderPUT /flags/{flagID}/segments/reorder
TagApicreate_tagPOST /flags/{flagID}/tags
TagApidelete_tagDELETE /flags/{flagID}/tags/{tagID}
TagApifind_all_tagsGET /tags
TagApifind_tagsGET /flags/{flagID}/tags
VariantApicreate_variantPOST /flags/{flagID}/variants
VariantApidelete_variantDELETE /flags/{flagID}/variants/{variantID}
VariantApifind_variantsGET /flags/{flagID}/variants
VariantApiput_variantPUT /flags/{flagID}/variants/{variantID}

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author