This guide will help you get the most out of the Parble Python SDK to easily extract data from your documents.
We will explain how to use the SDK in a new or existing inbox. Want to test in your own terminal before integrating? Please check the .
Feel free to check the full documentation on our dedicated .
It is a prerequisite that you have installed Python. If you haven't, please follow the instructions on .
To install the Parble Python SDK, run the following command in your terminal:
pip install parble
To use the Parble Python SDK, you will need to import the package, initialize the client and call the method to extract the data from your documents.
To import the Parble module run the following command:
from parble import ParbleSDK
To initialize the client, provide your API key. You can find your API key and tenant name in your dashboard after login in.
parble = ParbleSDK(url="https://api.parble.com/v1/YOUR_TENANT_ID", api_key="YOUR_API_KEY")
To process your files, call the method “post” inside the “files” class of the Parble client and provide the file you want to process.
You only need to provide the file path, the endpoint is designed to take care of the rest, such as splitting and classifying the file and afterwards extracting the relevant information from it.
The method returns the output with the extracted data from your file. Checking the return can be done as shown in the example below.
Example print the return Object:
file = parble.files.post("PATH_TO_YOUR_FILE", inbox_id="INBOX_ID")
print(file)
The Parble Python SDK also provides other built-in methods. We invite you to check out the github repository to see the full documentation of the SDK. Some of the examples would be: