Python SDK for the Hightop API
Project description
Hightop SDK
A Python SDK for the Hightop API.
Installation
pip install hightop_sdk
Usage
Basic Setup
from hightop_sdk import HightopSDK
# Initialize the SDK with your API key
sdk = HightopSDK(api_key="your_api_key_here")
# Make API calls using the SDK
response = sdk.your_api_endpoint()
Configuration
You can configure the SDK with various options:
from hightop_sdk import HightopSDK, Configuration
# Create a custom configuration
config = Configuration(
api_key="your_api_key_here",
host="https://api.hightop.com/api", # Optional: customize API host
timeout=30 # Optional: set request timeout
)
# Initialize SDK with custom configuration
sdk = HightopSDK(configuration=config)
Error Handling
The SDK includes built-in error handling for common API errors:
from hightop_sdk.exceptions import ApiException
try:
response = sdk.your_api_endpoint()
except ApiException as e:
print(f"API Error: {e.status} - {e.reason}")
except Exception as e:
print(f"Unexpected error: {str(e)}")
Response Handling
API responses are automatically deserialized into Python objects:
# Example response handling
response = sdk.your_api_endpoint()
data = response.data # Access the deserialized response data
Examples
Making API Requests
# Example of making a GET request
response = sdk.get_data()
# Example of making a POST request with data
data = {
"name": "Example",
"value": 123
}
response = sdk.create_data(data)
# Example of making a request with query parameters
response = sdk.search_data(query="example", limit=10)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
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 hightop_sdk-0.1.1.tar.gz.
File metadata
- Download URL: hightop_sdk-0.1.1.tar.gz
- Upload date:
- Size: 67.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31fe0cb6bfed4356ca32a2c4b3c8c04e1856853eb471aa17e9967467893df9f9
|
|
| MD5 |
fdffc741cb500ed8e18d64c850ec45b2
|
|
| BLAKE2b-256 |
bc7a31fdf474a0c290d5a9df10f4c010dc0d5cbdbeec666930f847a85bf05e13
|
File details
Details for the file hightop_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: hightop_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 416.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
584867cfd5c6c30ccce889c7a5b69858d89b803c992431603c0e07b4100b2e55
|
|
| MD5 |
7b2c0be8cc5f89de9c4fce5f5dd0ee82
|
|
| BLAKE2b-256 |
686db0cf751f52e7afc060d1b18ee041e1dabc4e68aca4c1bfabea9703525b71
|