A Python client for the CogStack Model Gateway
Project description
CogStack Model Gateway Client
A Python client for interacting with the CogStack Model Gateway. The default and recommended client implementation is asynchronous, but a blocking synchronous one is also provided for easier experimentation.
Installation
pip install cogstack-model-gateway-client
Usage
The project is under active development and so is the documentation. Seems like looking at the source code is the only way to figure out what the client does.
Async Client
import asyncio
from cogstack_model_gateway_client import GatewayClient
async def main():
async with GatewayClient(base_url="http://your-gateway-url", default_model="your-model") as client:
# Generate annotations for a given text
result = await client.process("Sample input text")
print(result)
asyncio.run(main())
Synchronous Client
from cogstack_model_gateway_client import GatewayClientSync
client = GatewayClientSync(base_url="http://your-gateway-url", default_model="your-model")
result = client.process("Sample input text")
print(result)
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 cogstack_model_gateway_client-0.1.2.tar.gz.
File metadata
- Download URL: cogstack_model_gateway_client-0.1.2.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.9 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebfc38a65b5c2d5dc09fc8d16f113242f8eb34044c37f29b804bdd5be474ab1a
|
|
| MD5 |
6583a63a502aa73aa36ca9bc4ff855d6
|
|
| BLAKE2b-256 |
9c53795566e6bc999fb8ea3f946f3e850d54c0e7d709736053bbdc5e136586c3
|
File details
Details for the file cogstack_model_gateway_client-0.1.2-py3-none-any.whl.
File metadata
- Download URL: cogstack_model_gateway_client-0.1.2-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.9 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cebb2737d6038b6836f91869bdd8f54312a13a98937a5d273ae82c741e4760cf
|
|
| MD5 |
2a959c3a327b1665bd14b312ea19a303
|
|
| BLAKE2b-256 |
5365c70635c665e6851ffa1b05f998471675a5e09d6ef296e1d5429ae6e846a2
|