brx-python

Get started with the examples located in tests.py.

It's easy to implement BRX's Python package:

  1. Initialize your BRX Client with your access token:
brx_client = BRX(os.environ.get("BRX_ACCESS_TOKEN")) 
  1. Get your schema from your dashboard
  2. Convert your schema to a modifiable query
query_rebuild = sftoq(schema)
  1. Extract the input fields, and set your desired values.
output_object = query_rebuild["brx_query"]
input_fields = query_rebuild["input_fields"]
  1. Set your desired values
for index, input_field in enumerate(input_fields):
    input_fields[index]["value"] = input(f"Please enter the value for {input_field['name']}: ")
  1. Update your query
updated_query = uif(input_fields, output_object)
  1. Run your BRX!
result = brx_client.execute(updated_query["brx_query"])