Ask Sage Python Client v1.42
This is the official Python client for the Ask Sage API. It allows you to interact with the Ask Sage service, providing a simple and pythonic way to make requests to the service.
Check Ask Sage API documentation here: https://docs.asksage.ai
Installation
You can install the Ask Sage Python client via pip:
pip install asksageclient
Usage
First, import the client:
from asksageclient import AskSageClient
Then, instantiate the client:
client = AskSageClient('your_email_here', 'your_api_key_here') Warning: Do not store credentials in code, use environment variables/secrets instead
Now, you can use the client to interact with the Ask Sage service. For example, to interact with the main endpoint:
response = client.query(message='Who is Nic Chaillan?')
print(response)
Endpoints
The client provides methods for all the Ask Sage API endpoints:
get_modelsadd_datasetdelete_datasetassign_datasetget_user_logsget_user_loginsqueryquery_pluginexecute_pluginfollow_up_questionstokenizerget_personasget_datasetsget_pluginscount_monthly_tokenscount_monthly_teach_tokenstraintrain_with_filefile
Each method corresponds to an endpoint of the Ask Sage API. The content parameter should be a dictionary containing the data you want to send in the request body.
Error Handling
The client includes basic error handling. If a request fails, it will print an error message and return None.
Contributing
Contributions are welcome! Please submit a pull request or create an issue to contribute to this project.
License
See the LICENSE file for details.
Metadata
Release files for asksageclient 1.42
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| asksageclient-1.42.tar.gz | 8.1 kB | Without provenance | Details for asksageclient-1.42.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| asksageclient-1.42-py3-none-any.whl | Python 3 | none | any | Details for asksageclient-1.42-py3-none-any.whl |
Total release size: 16.0 kB
Release files / asksageclient-1.42.tar.gz
| Download URL | asksageclient-1.42.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3bace22c4a9881c41af7aee918a694147042160800d563b704b1b2462e5e1f6f
|
|
BLAKE2b-256 checksum How to use checksums |
ed2d02a6ad0e04483164329c1c4fb73e6c7f5e8f482a11938eabf1bdb1a93afe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / asksageclient-1.42-py3-none-any.whl
| Download URL | asksageclient-1.42-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aa86978cb187134a9320784676b810a3a41c3f7779ad3ab235a7bc6e8835957a
|
|
BLAKE2b-256 checksum How to use checksums |
15b1a3c0d6ba360f838c42a799ea3539f34e1b6964a2142dbcb36c1c371076dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for asksageclient 1.42
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.