Get started with the examples located in tests.py
.
It's easy to implement BRX's Python package:
- Initialize your BRX Client with your access token:
brx_client = BRX(os.environ.get("BRX_ACCESS_TOKEN"))
- Get your schema from your dashboard
- Convert your schema to a modifiable query
query_rebuild = sftoq(schema)
- Extract the input fields, and set your desired values.
output_object = query_rebuild["brx_query"]
input_fields = query_rebuild["input_fields"]
- 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']}: ")
- Update your query
updated_query = uif(input_fields, output_object)
- Run your BRX!
result = brx_client.execute(updated_query["brx_query"])