Sentience API
Project description
sentience_sdk
API Gateway for Sentience Platform - Web Content Extraction and Element Coordinate Mapping
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 0.1.0
- Generator version: 7.18.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Requirements.
Python 3.9+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)
Then import the package:
import sentience_sdk
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install to install the package for all users)
Then import the package:
import sentience_sdk
Tests
Execute pytest to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import sentience_sdk
from sentience_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.sentienceapi.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sentience_sdk.Configuration(
host = "https://api.sentienceapi.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (API Key): apiKeyAuth
configuration = sentience_sdk.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with sentience_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sentience_sdk.SentienceObservationApi(api_client)
authorization = 'Bearer sk_live_51Mz...' # str | Sentience API Key. Format: 'Bearer <API_KEY>'
sentience_observe_request = sentience_sdk.SentienceObserveRequest() # SentienceObserveRequest |
try:
# Observe and extract web content or element coordinates
api_response = api_instance.observe(authorization, sentience_observe_request)
print("The response of SentienceObservationApi->observe:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling SentienceObservationApi->observe: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://api.sentienceapi.com
| Class | Method | HTTP request | Description |
|---|---|---|---|
| SentienceObservationApi | observe | POST /v1/observe | Observe and extract web content or element coordinates |
Documentation For Models
- SentienceAppliedFilters
- SentienceBoundingBox
- SentienceCreditDetails
- SentienceElementFilter
- SentienceElementStates
- SentienceErrorResponse
- SentienceInsufficientCreditsError
- SentienceInteractableElement
- SentienceLayoutViewport
- SentienceMapModeResponse
- SentienceObserve200Response
- SentienceObserveOptions
- SentienceObserveRequest
- SentienceOutputFormat
- SentiencePlanTier
- SentienceProcessingMode
- SentienceProxyFailure
- SentienceReaderModeResponse
- SentienceReaderModeResponseData
- SentienceRenderQuality
- SentienceResponseMetadata
- SentienceSubscriptionDetails
- SentienceSubscriptionInactiveError
- SentienceViewport
- SentienceVisualModeResponse
Documentation For Authorization
Authentication schemes defined for the API:
apiKeyAuth
- Type: Bearer authentication (API Key)
Author
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sentience_sdk-0.1.0.tar.gz.
File metadata
- Download URL: sentience_sdk-0.1.0.tar.gz
- Upload date:
- Size: 36.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86c33bf16edb5ce17e63e76032fc1d87a04a57bf0b499fe54cae9f0c97069fa8
|
|
| MD5 |
b916bf46b9e491fc066dee33cb7bc6e7
|
|
| BLAKE2b-256 |
28247e048ce6509366d2a9f727f8c8b5a40932a17d41d58f16b171d3030cabe8
|
File details
Details for the file sentience_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sentience_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 59.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
934e51eacb73b7dab444b1ede1efe33b187e82fe96cf6e2cd3fc0e37912326a6
|
|
| MD5 |
37f924b6c8c2f4ffbcd675febc34f001
|
|
| BLAKE2b-256 |
2860b329db92dafb428d7bc900f4461c65e8867ee055da83fe8106f14a2a6a53
|