File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ pip install fastapi-featureflags
2424
2525## Usage
2626A simple example of feature flags:
27- ```
27+ ``` python
2828from fastapi_featureflags import FeatureFlags, feature_flag, feature_enabled
2929
3030FeatureFlags(conf_from_url = " https://pastebin.com/raw/4Ai3j2DC" )
@@ -42,7 +42,7 @@ if feature_enabled("web_2"):
4242```
4343
4444You can get FF (feature flags) from a ** File** , ** URL** , ** Dictionary or ENV Variables** :
45- ```
45+ ``` python
4646FeatureFlags.load_conf_from_url(" https://pastebin.com/raw/4Ai3j2DC" )
4747FeatureFlags.load_conf_from_json(" tests/features.json" )
4848FeatureFlags.load_conf_from_dict({" web_1" : True , " web_2" : False })
@@ -62,7 +62,7 @@ All unregistered or on-the-fly created FF, that are not in the configuration wil
6262For non-production testing, a router is available,
6363so you can see the paths in swagger-ui docs.
6464Use ` include_in_schema=False ` when defining the router for public deployments
65- ```
65+ ``` python
6666from fastapi_featureflags import router as ff_router
6767app.include_router(ff_router, prefix = " /ff" , tags = [" FeatureFlags" ])
6868```
You can’t perform that action at this time.
0 commit comments