Preprocess SDK
Project description
Preprocess SDK
This is a repository for sdk for preprocess that will be used to interact with the system.
Initialise a connection
First, you should have an api key to use it, otherwise you'll not be allowed to connect/interact with preprocess system To get an api key, feel free to send a request to Support asking for an api key.
1- preprocess = Preprocess(api_key=YOUR_API_KEY, filepath="path/for/file")
2- preprocess = Preprocess(api_key=YOUR_API_KEY, process_id="id_of_the_process")
3- preprocess = Preprocess(api_key=YOUR_API_KEY, process=ProcessResponse)
Chunk
Here you have to pass the filepath then call chunk method for chunking and it'll return to you a ProcessResponse object containing all info you'll need.
1- response = preprocess.chunk()
Getting the results
You can directly call one of those methods that'll be listed to get the result after getting a success chunk call, or whenever you want call them after initialise the Preprocess object with either
process_id
orprocess
which is a PreprocessResponse object, and the result will be always a PreprocessResponse containing the chunks inside data parameter.
- If you want to wait until it finish use
wait()
method1, 2 and 3- result = preprocess.wait() - print(result.data['chunks'])
- If you don't want to wait consider calling
result()
and check the status if it's not FINISHED or OK, so it's still chunking.1, 2 and 3- result = preprocess.result() - if result.status in ["FINISHED", "OK"]: - print(result.data['chunks'])
Other methods
This part will containing some existing function may help you
set_filepath(path)
setting the file path after initialise the object.set_process_id(id)
setting the process_id param by id.set_process(process)
setting the process_id param by PrepreocessResponse object.set_info(dict)
info for handle the chunking based on your needs.to_json()
returning a json str representing the current object.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pypreprocess-1.1.0.tar.gz
.
File metadata
- Download URL: pypreprocess-1.1.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d84642613115e567435e1029e5852c75fa7b4e1fdf7384cea1472e5db13de1db |
|
MD5 | 455ecb995b2e01dd9ad7af18a8e11d38 |
|
BLAKE2b-256 | 549fb2baa6f792bd4579790289011e4dca7c2d21c21a32ca7987d27de3db4e65 |
File details
Details for the file pypreprocess-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: pypreprocess-1.1.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f566dad94048ed543365e9a3d8883458050de2e9495978b1662cd50407eb68bd |
|
MD5 | 79ba650a5825ac8f3dc4e6d2a5680d73 |
|
BLAKE2b-256 | 1d87f88193035165108b0dc92497c00dfd8cc821b0511626c060af6427f217cb |